CPPLapack
 All Classes Files Functions Variables Friends
zrovector-constructor.hpp
Go to the documentation of this file.
00001 //=============================================================================
00002 /*! zrovector constructor */
00003 inline zrovector::zrovector()
00004 {VERBOSE_REPORT;
00005   //////// initialize ////////
00006   l =0;
00007   array =NULL;
00008 }
00009 
00010 //=============================================================================
00011 /*! zrovector copy constructor */
00012 inline zrovector::zrovector(const zrovector& vec)
00013 {VERBOSE_REPORT;
00014   //////// initialize ////////
00015   l =vec.l;
00016   array =new comple[l];
00017   
00018   //////// copy ////////
00019   zcopy_(l, vec.array, 1, array, 1);
00020 }
00021 
00022 //=============================================================================
00023 /*! zrovector constructor to cast _zrovector */
00024 inline zrovector::zrovector(const _zrovector& vec)
00025 {VERBOSE_REPORT;
00026   //////// initialize ////////
00027   l =vec.l;
00028   array =vec.array;
00029   
00030   vec.nullify();
00031 }
00032 
00033 //=============================================================================
00034 /*! zrovector constructor with size specification */
00035 inline zrovector::zrovector(const long& _l)
00036 {VERBOSE_REPORT;
00037 #ifdef  CPPL_DEBUG
00038   if( _l<0 ){
00039     ERROR_REPORT;
00040     std::cerr << "Vector size must be positive integers. " << std::endl
00041               << "Your input was (" << _l << ")." << std::endl;
00042     exit(1);
00043   }
00044 #endif//CPPL_DEBUG
00045   
00046   //////// initialize ////////
00047   l =_l;
00048   array =new comple[l];
00049 }
00050 
00051 //=============================================================================
00052 /*! zrovector constructor with filename */
00053 inline zrovector::zrovector(const char* filename)
00054 {VERBOSE_REPORT;
00055   array =NULL;
00056   
00057   //// read ////
00058   read(filename);
00059 }
00060 
00061 ///////////////////////////////////////////////////////////////////////////////
00062 ///////////////////////////////////////////////////////////////////////////////
00063 ///////////////////////////////////////////////////////////////////////////////
00064 
00065 //=============================================================================
00066 /*! zrovector destructor */
00067 inline zrovector::~zrovector()
00068 {VERBOSE_REPORT;
00069   //////// delete array ////////
00070   delete [] array;
00071 }
 All Classes Files Functions Variables Friends