6 std::cerr <<
"# [MARK] zrovector::operator()(const long&)"
12 std::cerr <<
"[ERROR] zrovector::operator()(const long&)"
14 <<
"The required component is out of the vector size."
16 <<
"Your input was (" << i <<
")." << std::endl;
29 std::cerr <<
"# [MARK] zrovector::operator()(const long&) const"
35 std::cerr <<
"[ERROR] zrovector::operator()(const long&) const"
37 <<
"The required component is out of the vector size."
39 <<
"Your input was (" << i <<
")." << std::endl;
53 inline void zrovector::set(
const long& i,
const std::complex<double>& v)
const
56 std::cerr <<
"# [MARK] zrovector::set(const long&, const std::complex<double>&) const"
62 std::cerr <<
"[ERROR] zrovector::set(const long&, const 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 zrovector& vec)
82 std::cerr <<
"# [MARK] operator<<(std::ostream&, const zrovector&)"
86 for(
long i=0; i<vec.L; i++){ s <<
" " << vec.Array[i]; }
97 inline void zrovector::write(
const char* filename)
const
100 std::cerr <<
"# [MARK] zrovector::write(const char*) const"
104 std::ofstream s(filename, std::ios::trunc);
106 s <<
"zrovector" <<
" " <<
L << std::endl;
107 for(
long i=0; i<
L; i++){
116 inline void zrovector::read(
const char* filename)
119 std::cerr <<
"# [MARK] zrovector::read(const char*)"
123 std::ifstream s( filename );
125 std::cerr <<
"[ERROR] zrovector::read(const char*) " << std::endl
126 <<
"The file \"" << filename <<
"\" can not be opened."
133 if(
id !=
"zrovector" ){
134 std::cerr <<
"[ERROR] zrovector::read(const char*) " << std::endl
135 <<
"The type name of the file \"" << filename
136 <<
"\" is not zrovector." << std::endl
137 <<
"Its type name was " <<
id <<
" ." << std::endl;
143 for(
long i=0; i<
L; i++){
147 std::cerr <<
"[ERROR] zrovector::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;
long L
vector size
Definition: _zrovector.hpp:7
std::complex< double > & operator()(const long &)
Definition: zrovector-io.hpp:3
Complex Double-precision Row Vector Class.
Definition: zrovector.hpp:3
void resize(const long &)
Definition: zrovector-misc.hpp:93
void set(const long &, const std::complex< double > &) const
Definition: zrovector-io.hpp:53
std::complex< double > * Array
1D Array to store vector data
Definition: _zrovector.hpp:8