|
version
0.0.1
Defines the C++ API for MsPASS
|
Public Member Functions | |
| ComplexArray () | |
| ComplexArray (std::vector< Complex64 > &d) | |
| ComplexArray (std::vector< Complex32 > &d) | |
| ComplexArray (int nsamp, FortranComplex32 *d) | |
| ComplexArray (int nsamp, FortranComplex64 *d) | |
| ComplexArray (int nsamp, float *d) | |
| ComplexArray (int nsamp, double *d) | |
| ComplexArray (int nsamp) | |
| template<class T > | |
| ComplexArray (int nsamp, std::vector< T > d) | |
| template<class T > | |
| ComplexArray (int nsamp, T d) | |
| ComplexArray (std::vector< double > mag, std::vector< double > phase) | |
| ComplexArray (const ComplexArray &parent) | |
| ComplexArray & | operator= (const ComplexArray &parent) |
| Complex64 | operator[] (int sample) |
| double * | ptr () |
| double * | ptr (int sample) |
| ComplexArray & | operator+= (const ComplexArray &other) noexcept(false) |
| ComplexArray & | operator-= (const ComplexArray &other) noexcept(false) |
| ComplexArray & | operator*= (const ComplexArray &other) noexcept(false) |
| ComplexArray & | operator/= (const ComplexArray &other) noexcept(false) |
| const ComplexArray | operator+ (const ComplexArray &other) const noexcept(false) |
| const ComplexArray | operator- (const ComplexArray &other) const noexcept(false) |
| const ComplexArray | operator* (const ComplexArray &other) const noexcept(false) |
| const ComplexArray | operator/ (const ComplexArray &other) const noexcept(false) |
| void | conj () |
| std::vector< double > | abs () const |
| double | rms () const |
| double | norm2 () const |
| std::vector< double > | phase () const |
| int | size () const |
| mspass::algorithms::deconvolution::ComplexArray::ComplexArray | ( | ) |
Empty constructor.
| mspass::algorithms::deconvolution::ComplexArray::ComplexArray | ( | std::vector< Complex64 > & | d | ) |
Construct from stl vector container of complex.
| mspass::algorithms::deconvolution::ComplexArray::ComplexArray | ( | std::vector< Complex32 > & | d | ) |
Similar for 32 bit version
| mspass::algorithms::deconvolution::ComplexArray::ComplexArray | ( | int | nsamp, |
| FortranComplex32 * | d | ||
| ) |
Construct from a FORTRAN data array.
Fortran stores complex numbers in a mulitplexed array structure (real(1), imag(1), real(2), imag(2), etc.). The constructors below provide a mechanism for building this object from various permutations of this.
| nsamp | is the number of elements in the C vector |
| d | is the pointer to the first compoment of the fortran vector. |
| mspass::algorithms::deconvolution::ComplexArray::ComplexArray | ( | int | nsamp, |
| FortranComplex64 * | d | ||
| ) |
| mspass::algorithms::deconvolution::ComplexArray::ComplexArray | ( | int | nsamp, |
| float * | d | ||
| ) |
| mspass::algorithms::deconvolution::ComplexArray::ComplexArray | ( | int | nsamp, |
| double * | d | ||
| ) |
| mspass::algorithms::deconvolution::ComplexArray::ComplexArray | ( | int | nsamp | ) |
| mspass::algorithms::deconvolution::ComplexArray::ComplexArray | ( | int | nsamp, |
| std::vector< T > | d | ||
| ) |
Construct from different length of vector, adds zoeros to it And construct a constant arrays
| mspass::algorithms::deconvolution::ComplexArray::ComplexArray | ( | int | nsamp, |
| T | d | ||
| ) |
| mspass::algorithms::deconvolution::ComplexArray::ComplexArray | ( | std::vector< double > | mag, |
| std::vector< double > | phase | ||
| ) |
Construct from magnitude and phase arrays.
| mspass::algorithms::deconvolution::ComplexArray::ComplexArray | ( | const ComplexArray & | parent | ) |
| mspass::algorithms::deconvolution::ComplexArray::~ComplexArray | ( | ) |
| vector< double > mspass::algorithms::deconvolution::ComplexArray::abs | ( | ) | const |
| void mspass::algorithms::deconvolution::ComplexArray::conj | ( | ) |
product of complex and real vectors
product of complex and a number
Change vector to complex conjugates.
| double mspass::algorithms::deconvolution::ComplexArray::norm2 | ( | ) | const |
| const ComplexArray mspass::algorithms::deconvolution::ComplexArray::operator* | ( | const ComplexArray & | other | ) | const |
| ComplexArray & mspass::algorithms::deconvolution::ComplexArray::operator*= | ( | const ComplexArray & | other | ) |
| const ComplexArray mspass::algorithms::deconvolution::ComplexArray::operator+ | ( | const ComplexArray & | other | ) | const |
| ComplexArray & mspass::algorithms::deconvolution::ComplexArray::operator+= | ( | const ComplexArray & | other | ) |
| const ComplexArray mspass::algorithms::deconvolution::ComplexArray::operator- | ( | const ComplexArray & | other | ) | const |
| ComplexArray & mspass::algorithms::deconvolution::ComplexArray::operator-= | ( | const ComplexArray & | other | ) |
| const ComplexArray mspass::algorithms::deconvolution::ComplexArray::operator/ | ( | const ComplexArray & | other | ) | const |
| ComplexArray & mspass::algorithms::deconvolution::ComplexArray::operator/= | ( | const ComplexArray & | other | ) |
| ComplexArray & mspass::algorithms::deconvolution::ComplexArray::operator= | ( | const ComplexArray & | parent | ) |
| Complex64 mspass::algorithms::deconvolution::ComplexArray::operator[] | ( | int | sample | ) |
Return a pointer to a fortran array containing the data vector.
The array linked to the returned pointer should be created with the new operator and the caller should be sure to use delete [] to free this memory when finished.
Index operator. Cannot make it work by getting the address from reference. Have to call the ptr() function to get the address.
| sample | is the sample number to return. |
| vector< double > mspass::algorithms::deconvolution::ComplexArray::phase | ( | ) | const |
| double * mspass::algorithms::deconvolution::ComplexArray::ptr | ( | ) |
| double * mspass::algorithms::deconvolution::ComplexArray::ptr | ( | int | sample | ) |
| double mspass::algorithms::deconvolution::ComplexArray::rms | ( | ) | const |
| int mspass::algorithms::deconvolution::ComplexArray::size | ( | ) | const |