Go to the documentation of this file.00001
00002
00003 inline zhsmatrix::zhsmatrix()
00004 : m(n)
00005 {VERBOSE_REPORT;
00006
00007 n =0;
00008 data.clear();
00009 line.clear();
00010 }
00011
00012
00013
00014
00015
00016
00017
00018 inline zhsmatrix::zhsmatrix(const zhsmatrix& mat)
00019 : m(n)
00020 {VERBOSE_REPORT;
00021 data.clear();
00022 line.clear();
00023 copy(mat);
00024 }
00025
00026
00027
00028 inline zhsmatrix::zhsmatrix(const _zhsmatrix& mat)
00029 : m(n)
00030 {VERBOSE_REPORT;
00031 n =mat.n;
00032 data.clear();
00033 line.clear();
00034
00035 data.swap(mat.data);
00036 line.swap(mat.line);
00037
00038 mat.nullify();
00039 }
00040
00041
00042
00043
00044
00045
00046
00047 inline zhsmatrix::zhsmatrix(const long& _n, const long _c)
00048 : m(n)
00049 {VERBOSE_REPORT;
00050 #ifdef CPPL_DEBUG
00051 if( _n<0 || _c<0 ){
00052 ERROR_REPORT;
00053 std::cerr << "Matrix sizes and the length of arrays must be positive integers. " << std::endl
00054 << "Your input was (" << _n << "," << _c << ")." << std::endl;
00055 exit(1);
00056 }
00057 #endif//CPPL_DEBUG
00058
00059
00060 n =_n;
00061 data.resize(0);
00062 data.reserve(_c);
00063 line.resize(n);
00064 }
00065
00066
00067
00068 inline zhsmatrix::zhsmatrix(const char* filename)
00069 : m(n)
00070 {VERBOSE_REPORT;
00071 data.clear();
00072 line.clear();
00073
00074
00075 read(filename);
00076 }
00077
00078
00079
00080
00081
00082
00083
00084 inline zhsmatrix::~zhsmatrix()
00085 {VERBOSE_REPORT;
00086 data.clear();
00087 line.clear();
00088 }