Back to home page

EIC code displayed by LXR

 
 

    


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

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