CPPLapack
|
Samll Complex Double-precision Row Vector Class. More...
#include <zrovector_small.hpp>
Public Member Functions | |
zrovector_small () | |
zrovector_small (const zrovector &) | |
zrovector_small (const comple &) | |
zrovector_small (const comple &, const comple &) | |
zrovector_small (const comple &, const comple &, const comple &) | |
~zrovector_small () | |
_zrovector | to_zrovector () const |
comple & | operator() (const long &) |
comple | operator() (const long &) const |
zrovector_small< l > & | set (const long &, const comple &) |
void | read (const char *filename) |
void | write (const char *filename) const |
zrovector_small< l > & | zero () |
template<long L> | |
zrovector_small< L > & | operator= (const zrovector_small< L > &) |
Public Attributes | |
comple | array [l] |
Friends | |
template<long _l> | |
std::ostream & | operator<< (std::ostream &, const zrovector_small< _l > &) |
template<long _l> | |
zcovector_small< _l > | t (const zrovector_small< _l > &) |
template<long _l> | |
comple | nrm2 (const zrovector_small< _l > &) |
template<long _l> | |
long | idamax (const zrovector_small< _l > &) |
template<long _l> | |
comple | damax (const zrovector_small< _l > &) |
template<long L> | |
zrovector_small< L > & | operator+= (zrovector_small< L > &, const zrovector_small< L > &) |
template<long L> | |
zrovector_small< L > & | operator-= (zrovector_small< L > &, const zrovector_small< L > &) |
template<long L> | |
zrovector_small< L > & | operator*= (zrovector_small< L > &, const comple &) |
template<long L> | |
zrovector_small< L > & | operator/= (zrovector_small< L > &, const comple &) |
template<long L> | |
const zrovector_small< L > & | operator+ (const zrovector_small< L > &) |
template<long L> | |
zrovector_small< L > | operator- (const zrovector_small< L > &) |
template<long L> | |
zrovector_small< L > | operator+ (const zrovector_small< L > &, const zrovector_small< L > &) |
template<long L> | |
zrovector_small< L > | operator- (const zrovector_small< L > &, const zrovector_small< L > &) |
template<long L> | |
comple | operator* (const zrovector_small< L > &, const zcovector_small< L > &) |
template<long M, long N> | |
zrovector_small< N > | operator* (const zrovector_small< M > &, const zgematrix_small< M, N > &) |
template<long L> | |
zrovector_small< L > | operator* (const zrovector_small< L > &, const dsymatrix_small< L > &) |
template<long L> | |
zrovector_small< L > | operator* (const zrovector_small< L > &, const comple &) |
template<long L> | |
zrovector_small< L > | operator/ (const zrovector_small< L > &, const comple &) |
template<long L> | |
zrovector_small< L > | operator* (const comple &, const zrovector_small< L > &) |
Samll Complex Double-precision Row Vector Class.
Definition at line 3 of file zrovector_small.hpp.
zrovector_small< l >::zrovector_small | ( | ) | [inline] |
Definition at line 4 of file zrovector_small-constructors.hpp.
{VERBOSE_REPORT; ; }
zrovector_small< l >::zrovector_small | ( | const zrovector & | vec | ) | [inline, explicit] |
Definition at line 12 of file zrovector_small-constructors.hpp.
References zrovector::array, and zrovector::l.
zrovector_small< l >::zrovector_small | ( | const comple & | x | ) | [inline] |
Definition at line 31 of file zrovector_small-constructors.hpp.
{VERBOSE_REPORT; for(long k=0; k<l; k++){ array[k] =x; } }
zrovector_small< l >::zrovector_small | ( | const comple & | x, |
const comple & | y | ||
) | [inline] |
Definition at line 41 of file zrovector_small-constructors.hpp.
zrovector_small< l >::zrovector_small | ( | const comple & | x, |
const comple & | y, | ||
const comple & | z | ||
) | [inline] |
Definition at line 50 of file zrovector_small-constructors.hpp.
zrovector_small< l >::~zrovector_small | ( | ) | [inline] |
Definition at line 64 of file zrovector_small-constructors.hpp.
{VERBOSE_REPORT; ; }
_zrovector zrovector_small< l >::to_zrovector | ( | ) | const [inline] |
Definition at line 4 of file zrovector_small-functions.hpp.
References _().
comple & zrovector_small< l >::operator() | ( | const long & | k | ) | [inline] |
Definition at line 20 of file zrovector_small-functions.hpp.
{VERBOSE_REPORT; return array[k]; }
comple zrovector_small< l >::operator() | ( | const long & | k | ) | const [inline] |
Definition at line 28 of file zrovector_small-functions.hpp.
{VERBOSE_REPORT; return array[k]; }
zrovector_small< l > & zrovector_small< l >::set | ( | const long & | k, |
const comple & | v | ||
) | [inline] |
Definition at line 36 of file zrovector_small-functions.hpp.
{VERBOSE_REPORT; (*this)(k) =v; return *this; }
void zrovector_small< l >::read | ( | const char * | filename | ) | [inline] |
Definition at line 76 of file zrovector_small-functions.hpp.
{VERBOSE_REPORT; std::ifstream s( filename ); if(!s){ ERROR_REPORT; std::cerr << "The file \"" << filename << "\" can not be opened." << std::endl; exit(1); } std::string id; s >> id; if( id != "zrovector" && id != "#zrovector" ){ ERROR_REPORT; std::cerr << "The type name of the file \"" << filename << "\" is not zrovector." << std::endl << "Its type name was " << id << " ." << std::endl; exit(1); } long _l; s >> _l; if(l!=_l){ ERROR_REPORT; std::cerr << "Matrix size is invalid." << std::endl; exit(1); } for(long k=0; k<l; k++){ s >> (*this)(k); } if(s.eof()){ ERROR_REPORT; std::cerr << "There is something is wrong with the file \"" << filename << "\"." << std::endl << "Most likely, there is not enough data components, or a linefeed code or space code is missing at the end of the last line." << std::endl; exit(1); } s >> id;//tmp if(!s.eof()){ ERROR_REPORT; std::cerr << "There is something is wrong with the file \"" << filename << "\"." << std::endl << "Most likely, there are extra data components." << std::endl; exit(1); } s.close(); }
void zrovector_small< l >::write | ( | const char * | filename | ) | const [inline] |
Definition at line 58 of file zrovector_small-functions.hpp.
{VERBOSE_REPORT; std::ofstream ofs(filename, std::ios::trunc); ofs.setf(std::cout.flags()); ofs.precision(std::cout.precision()); ofs.width(std::cout.width()); ofs.fill(std::cout.fill()); ofs << "#zrovector" << " " << l << std::endl; for(long k=0; k<l; k++){ ofs << (*this)(k) << std::endl; } ofs.close(); }
zrovector_small< l > & zrovector_small< l >::zero | ( | ) | [inline] |
Definition at line 200 of file zrovector_small-functions.hpp.
{VERBOSE_REPORT; for(long k=0; k<l; k++){ array[k] =0.; } return *this; }
zrovector_small<L>& zrovector_small< l >::operator= | ( | const zrovector_small< L > & | ) | [inline] |
std::ostream& operator<< | ( | std::ostream & | , |
const zrovector_small< _l > & | |||
) | [friend] |
zrovector_small<L>& operator+= | ( | zrovector_small< L > & | , |
const zrovector_small< L > & | |||
) | [friend] |
zrovector_small<L>& operator-= | ( | zrovector_small< L > & | , |
const zrovector_small< L > & | |||
) | [friend] |
zrovector_small<L>& operator*= | ( | zrovector_small< L > & | , |
const comple & | |||
) | [friend] |
zrovector_small<L>& operator/= | ( | zrovector_small< L > & | , |
const comple & | |||
) | [friend] |
const zrovector_small<L>& operator+ | ( | const zrovector_small< L > & | ) | [friend] |
zrovector_small<L> operator- | ( | const zrovector_small< L > & | ) | [friend] |
zrovector_small<L> operator+ | ( | const zrovector_small< L > & | , |
const zrovector_small< L > & | |||
) | [friend] |
zrovector_small<L> operator- | ( | const zrovector_small< L > & | , |
const zrovector_small< L > & | |||
) | [friend] |
comple operator* | ( | const zrovector_small< L > & | , |
const zcovector_small< L > & | |||
) | [friend] |
zrovector_small<N> operator* | ( | const zrovector_small< M > & | , |
const zgematrix_small< M, N > & | |||
) | [friend] |
zrovector_small<L> operator* | ( | const zrovector_small< L > & | , |
const dsymatrix_small< L > & | |||
) | [friend] |
zrovector_small<L> operator* | ( | const zrovector_small< L > & | , |
const comple & | |||
) | [friend] |
zrovector_small<L> operator/ | ( | const zrovector_small< L > & | , |
const comple & | |||
) | [friend] |
zrovector_small<L> operator* | ( | const comple & | , |
const zrovector_small< L > & | |||
) | [friend] |
comple zrovector_small< l >::array[l] |
Definition at line 9 of file zrovector_small.hpp.