7 for(CPPL_INT k=0; k<l; k++){
25 std::cerr <<
"The required component is out of the vector size." << std::endl
26 <<
"Your input is (" << k <<
"), whereas the vector size is " << l <<
"." << std::endl;
42 std::cerr <<
"The required component is out of the vector size." << std::endl
43 <<
"Your input is (" << k <<
"), whereas the vector size is " << l <<
"." << std::endl;
63 inline std::ostream& operator<<(std::ostream& s, const dcovector_small<l>& A)
65 s << std::setiosflags(std::ios::showpos);
66 for(CPPL_INT
i=0;
i<l;
i++){
67 s << A(
i) << std::endl;
77 std::ofstream ofs(filename, std::ios::trunc);
78 ofs.setf(std::cout.flags());
79 ofs.precision(std::cout.precision());
80 ofs.width(std::cout.width());
81 ofs.fill(std::cout.fill());
83 ofs <<
"#dcovector" <<
" " << l << std::endl;
84 for(CPPL_INT k=0; k<l; k++){
85 ofs << (*this)(k) << std::endl;
95 std::ifstream s( filename );
98 std::cerr <<
"The file \"" << filename <<
"\" can not be opened." << std::endl;
104 if(
id !=
"dcovector" &&
id !=
"#dcovector" ){
106 std::cerr <<
"The type name of the file \"" << filename <<
"\" is not dcovector." << std::endl
107 <<
"Its type name was " <<
id <<
" ." << std::endl;
115 std::cerr <<
"Matrix size is invalid." << std::endl;
118 for(CPPL_INT k=0; k<l; k++){
123 std::cerr <<
"There is something is wrong with the file \"" << filename <<
"\"." << std::endl
124 <<
"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;
131 std::cerr <<
"There is something is wrong with the file \"" << filename <<
"\"." << std::endl
132 <<
"Most likely, there are extra data components." << std::endl;
150 {CPPL_VERBOSE_REPORT;
152 for(CPPL_INT
i=0;
i<l;
i++){
162 {CPPL_VERBOSE_REPORT;
164 for(CPPL_INT
i=0;
i<l;
i++){
174 {CPPL_VERBOSE_REPORT;
176 for(
int k=0; k<l; k++){
177 if( max<fabs(A(k)) ){
189 {CPPL_VERBOSE_REPORT;
203 {CPPL_VERBOSE_REPORT;
204 for(CPPL_INT k=0; k<l; k++){
218 {CPPL_VERBOSE_REPORT;
219 for(CPPL_INT
i=0;
i<l;
i++){
229 {CPPL_VERBOSE_REPORT;
230 for(CPPL_INT
i=0;
i<l;
i++){
240 {CPPL_VERBOSE_REPORT;
241 for(CPPL_INT
i=0;
i<l;
i++){
251 {CPPL_VERBOSE_REPORT;
252 for(CPPL_INT
i=0;
i<l;
i++){
266 {CPPL_VERBOSE_REPORT;
274 {CPPL_VERBOSE_REPORT;
276 for(CPPL_INT
i=0;
i<l;
i++){
290 {CPPL_VERBOSE_REPORT;
292 for(CPPL_INT
i=0;
i<l;
i++){
302 {CPPL_VERBOSE_REPORT;
304 for(CPPL_INT
i=0;
i<l;
i++){
318 {CPPL_VERBOSE_REPORT;
320 for(CPPL_INT
i=0;
i<n;
i++){
328 template<CPPL_INT m, CPPL_INT n>
330 {CPPL_VERBOSE_REPORT;
332 for(CPPL_INT
i=0;
i<m;
i++){
333 for(CPPL_INT j=0; j<n; j++){
348 {CPPL_VERBOSE_REPORT;
350 for(CPPL_INT
i=0;
i<n;
i++){
364 {CPPL_VERBOSE_REPORT;
366 for(CPPL_INT
i=0;
i<l;
i++){
380 {CPPL_VERBOSE_REPORT;
382 for(CPPL_INT
i=0;
i<l;
i++){
dcovector_small< l > & operator-=(dcovector_small< l > &A, const dcovector_small< l > &B)
dcovector_small< l > operator-(const dcovector_small< l > &A)
dcovector_small< l > & zero()
dcovector_small< l > hadamard(const dcovector_small< l > &A, const dcovector_small< l > &B)
void write(const char *filename) const
double & operator()(const CPPL_INT &)
dcovector_small< n > operator/(const dcovector_small< n > &A, const double &v)
dcovector_small< l > & operator/=(dcovector_small< l > &A, const double &d)
Samll Real Double-precision General Dence Matrix Class.
dcovector_small< l > & set(const CPPL_INT &, const double &)
dcovector_small< l > & operator+=(dcovector_small< l > &A, const dcovector_small< l > &B)
_dgematrix i(const _dgbmatrix &mat)
Samll Real Double-precision Row Vector Class.
double damax(const dcovector_small< l > &A)
dcovector_small< l > & operator*=(dcovector_small< l > &A, const double &d)
double operator%(const dcovector_small< l > &A, const dcovector_small< l > &B)
void read(const char *filename)
Samll Real Double-precision Column Vector Class.
const dcovector_small< l > & operator+(const dcovector_small< l > &A)
Real Double-precision Column Vector Class.
dcovector_small< n > operator*(const dcovector_small< n > &A, const double &v)
drovector_small< l > t(const dcovector_small< l > &A)
_dcovector to_dcovector() const
void idamax(CPPL_INT &K, const dcovector_small< l > &A)
(DO NOT USE) Smart-temporary Real Double-precision Column Vector Class
double nrm2(const dcovector_small< l > &A)
_dcovector _(dcovector &vec)