6 std::cerr <<
"# [MARK] zcovector::operator()(const long&)"
12 std::cerr <<
"[ERROR] zcovector::operator()(long&)"
14 <<
"The required component is out of the vector size."
16 <<
"Your input was (" << i <<
")." << std::endl;
29 std::cerr <<
"# [MARK] zcovector::operator()(const long&) const"
35 std::cerr <<
"[ERROR] zcovector::operator()(long&) const"
37 <<
"The required component is out of the vector size."
39 <<
"Your input was (" << i <<
")." << std::endl;
53 inline void zcovector::set(
const long& i,
const std::complex<double>& v)
const
56 std::cerr <<
"# [MARK] zcovector::set(const long&, const std::complex<double>&) const"
62 std::cerr <<
"[ERROR] zcovector::set(long&, std::complex<double>&) const"
64 <<
"The required component is out of the vector size."
66 <<
"Your input was (" << i <<
")." << std::endl;
79 inline std::ostream& operator<<(std::ostream& s,
const zcovector& vec)
82 std::cerr <<
"# [MARK] operator<<(std::ostream&, const zcovector&)"
86 for(
long i=0; i<vec.L; i++){
87 s <<
" " << vec.Array[i] << std::endl;
98 inline void zcovector::write(
const char *filename)
const
101 std::cerr <<
"# [MARK] zcovector::write(const char*) const"
105 std::ofstream s(filename, std::ios::trunc);
107 s <<
"zcovector" <<
" " <<
L << std::endl;
108 for(
long i=0; i<
L; i++){
116 inline void zcovector::read(
const char *filename)
119 std::cerr <<
"# [MARK] zcovector::read(const char*)"
123 std::ifstream s(filename);
125 std::cerr <<
"[ERROR] zcovector::read(const char*) " << std::endl
126 <<
"The file \"" << filename <<
"\" can not be opened."
133 if(
id !=
"zcovector" ){
134 std::cerr <<
"[ERROR] zcovector::read(const char*) " << std::endl
135 <<
"The type name of the file \"" << filename
136 <<
"\" is not zcovector." << std::endl
137 <<
"Its type name was " <<
id <<
" ." << std::endl;
143 for(
long i=0; i<
L; i++){
147 std::cerr <<
"[ERROR] zcovector::read(const char*) " << std::endl
148 <<
"There is something is wrong with the file \""
149 << filename <<
" ." << std::endl
150 <<
"Most likely, there is not enough data components, "
151 <<
"or a linefeed code or space code is missing "
152 <<
"at the end of the last line." << std::endl;
std::complex< double > & operator()(const long &)
Definition: zcovector-io.hpp:3
void set(const long &, const std::complex< double > &) const
Definition: zcovector-io.hpp:53
void resize(const long &)
Definition: zcovector-misc.hpp:93
long L
vector size
Definition: _drovector.hpp:7
double * Array
1D Array to store vector data
Definition: _drovector.hpp:8
Complex Double-precision Column Vector Class.
Definition: zcovector.hpp:3