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