Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:48:23

0001 /*
0002  * MatrixComplex2D.h
0003  *
0004  *  Created on: Jan 16, 2016
0005  *      Author: Pawel Sznajder (IPNO)
0006  */
0007 
0008 #ifndef MATRIXCOMPLEX2D_H_
0009 #define MATRIXCOMPLEX2D_H_
0010 
0011 #include <complex>
0012 
0013 #include "MatrixComplexD.h"
0014 
0015 namespace NumA {
0016 
0017 /**
0018  * @class MatrixComplex2D
0019  *
0020  * @brief Matrix of complex numbers of size 2x2.
0021  *
0022  * This class represents a matrix of complex double precision numbers. The size of this matrix is 2x2.
0023  */
0024 class MatrixComplex2D: public MatrixComplexD {
0025 
0026 public:
0027 
0028     /**
0029      * Default constructor.
0030      */
0031     MatrixComplex2D();
0032 
0033     /**
0034      * Copy constructor.
0035      * @param v Object to be copied.
0036      */
0037     MatrixComplex2D(const MatrixComplex2D& v);
0038 
0039     /**
0040      * Copy constructor.
0041      * @param v Object to be copied.
0042      */
0043     MatrixComplex2D(const MatrixComplexD& v);
0044 
0045     /**
0046      * Destructor.
0047      */
0048     ~MatrixComplex2D();
0049 
0050     /**
0051      * Operator =.
0052      */
0053     void operator=(const MatrixComplex2D& rhs);
0054 
0055     /**
0056      * Operator +.
0057      */
0058     MatrixComplex2D operator+(const MatrixComplex2D& rhs);
0059 
0060     /**
0061      * Operator -.
0062      */
0063     MatrixComplex2D operator-(const MatrixComplex2D& rhs);
0064 
0065     /**
0066      * Operator * by real number (rhs).
0067      */
0068     MatrixComplex2D operator*(const double& rhs);
0069 
0070     /**
0071      * Operator * by real number (lhs).
0072      */
0073     friend MatrixComplex2D operator*(const double& lhs, MatrixComplex2D& rhs);
0074 
0075     /**
0076      * Operator * by complex number (rhs).
0077      */
0078     MatrixComplex2D operator*(const std::complex<double>& rhs);
0079 
0080     /**
0081      * Operator * by complex number (lhs).
0082      */
0083     friend MatrixComplex2D operator*(const std::complex<double>& lhs,
0084             MatrixComplex2D& rhs);
0085 };
0086 
0087 } /* namespace NumA */
0088 
0089 #endif /* MATRIXCOMPLEXD_H_ */