Go to the documentation of this file.00001
00002
00003 inline dcovector::dcovector()
00004 {VERBOSE_REPORT;
00005
00006 l =0;
00007 cap =0;
00008 array =NULL;
00009 }
00010
00011
00012
00013 inline dcovector::dcovector(const dcovector& vec)
00014 {VERBOSE_REPORT;
00015
00016 l =vec.l;
00017 cap =vec.cap;
00018 array =new double[cap];
00019
00020
00021 dcopy_(l, vec.array, 1, array, 1);
00022 }
00023
00024
00025
00026 inline dcovector::dcovector(const _dcovector& vec)
00027 {VERBOSE_REPORT;
00028
00029 l =vec.l;
00030 cap =vec.cap;
00031 array =vec.array;
00032
00033 vec.nullify();
00034 }
00035
00036
00037
00038 inline dcovector::dcovector(const long& _l, const long margin)
00039 {VERBOSE_REPORT;
00040 #ifdef CPPL_DEBUG
00041 if( _l<0 ){
00042 ERROR_REPORT;
00043 std::cerr << "Vector size must be positive integers. " << std::endl
00044 << "Your input was (" << _l << ")." << std::endl;
00045 exit(1);
00046 }
00047 if( margin<0 ){
00048 ERROR_REPORT;
00049 std::cerr << "Vector margin must be zero or above. " << std::endl
00050 << "Your input was (" << _l << ", " << margin << ")." << std::endl;
00051 exit(1);
00052 }
00053 #endif//CPPL_DEBUG
00054
00055
00056 l =_l;
00057 cap =l+margin;
00058 array =new double[cap];
00059 }
00060
00061
00062
00063 inline dcovector::dcovector(const char* filename)
00064 {VERBOSE_REPORT;
00065 array =NULL;
00066 read(filename);
00067 }
00068
00069
00070
00071
00072
00073
00074
00075 inline dcovector::~dcovector()
00076 {VERBOSE_REPORT;
00077
00078 delete [] array;
00079 }