CPPLapack
 All Classes Files Functions Variables Friends
zcovector-constructor.hpp
Go to the documentation of this file.
00001 //=============================================================================
00002 /*! zcovector constructor */
00003 inline zcovector::zcovector()
00004 {VERBOSE_REPORT;
00005   //////// initialize ////////
00006   l =0;
00007   array =NULL;
00008 }
00009 
00010 //=============================================================================
00011 /*! zcovector copy constructor */
00012 inline zcovector::zcovector(const zcovector& 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 /*! zcovector constructor to cast _zcovector */
00024 inline zcovector::zcovector(const _zcovector& vec)
00025 {VERBOSE_REPORT;
00026   //////// initialize ////////
00027   l =vec.l;
00028   array =vec.array;
00029   
00030   vec.nullify();
00031 }
00032 
00033 //=============================================================================
00034 /*! zcovector constructor with size specification */
00035 inline zcovector::zcovector(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 /*! zcovector constructor with filename */
00053 inline zcovector::zcovector(const char* filename)
00054 {VERBOSE_REPORT;
00055   array =NULL;
00056   
00057   //// copy ////
00058   read(filename);
00059 }
00060 
00061 ///////////////////////////////////////////////////////////////////////////////
00062 ///////////////////////////////////////////////////////////////////////////////
00063 ///////////////////////////////////////////////////////////////////////////////
00064 
00065 //=============================================================================
00066 /*! zcovector destructor */
00067 inline zcovector::~zcovector()
00068 {VERBOSE_REPORT;
00069   //////// delete array ////////
00070   delete [] array;
00071 }
 All Classes Files Functions Variables Friends