| kspaceFirstOrder3D-OMP 1.0 The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D

- Main Page
- Classes
- Files

- File List
- File Members

MatrixClasses/ComplexMatrix.h
Go to the documentation of this file.

    00001
    00031 #ifndef COMPLEXMATRIXDATA_H
    00032 #define  COMPLEXMATRIXDATA_H
    00033
    00034 #include <MatrixClasses/BaseFloatMatrix.h>
    00035 #include <MatrixClasses/RealMatrix.h>
    00036
    00037 #include <Utils/DimensionSizes.h>
    00038
    00039
    00040 using namespace std;
    00041
    00042
    00043
    00044
    00049 struct TFloatComplex{
    00051     float real;
    00053     float imag;
    00054 };//TFloatComplex
    00055 //------------------------------------------------------------------------------
    00056
    00057
    00062 class TComplexMatrix : public TBaseFloatMatrix {
    00063 public:
    00064
    00066     TComplexMatrix(struct TDimensionSizes DimensionSizes);
    00067
    00069     virtual ~TComplexMatrix() { FreeMemory(); };
    00070
    00071
    00077     inline TFloatComplex& operator [](const size_t& index) {
    00078         return ((TFloatComplex *) pMatrixData)[index];
    00079     };
    00080
    00081
    00089     inline const  TFloatComplex& GetElementFrom3D(const size_t X, const size_t Y, const size_t Z){
    00090
    00091         return ((TFloatComplex *) pMatrixData)[Z * (p2DDataSliceSize>>1) + Y * (pDataRowSize>>1) + X];
    00092
    00093     };
    00094
    00095
    00097     virtual void ReadDataFromHDF5File(THDF5_File & HDF5_File, const char * MatrixName);
    00098
    00100     virtual void WriteDataToHDF5File(THDF5_File & HDF5_File, const char * MatrixName, const int CompressionLevel);
    00101
    00102
    00103
    00104
    00105 protected:
    00107     TComplexMatrix() : TBaseFloatMatrix() {};
    00108
    00109
    00111     TComplexMatrix(const TComplexMatrix& src);
    00112
    00114     TComplexMatrix& operator = (const TComplexMatrix& src);
    00115
    00117     virtual void InitDimensions(struct TDimensionSizes DimensionSizes);
    00118
    00119
    00120 private:
    00121
    00122
    00123 };// end of TComplexMatrix
    00124 //------------------------------------------------------------------------------
    00125
    00126 #endif   /* COMPLEXMATRIXDATA_H */
    00127

All Classes Files Functions Variables Typedefs Enumerations