CPPLapack
 All Classes Files Functions Variables Friends Pages
zrovector_small-constructors.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! zrovector_small constructor */
3 template<CPPL_INT l>
5 {CPPL_VERBOSE_REPORT;
6  ;
7 }
8 
9 //=============================================================================
10 /*! zrovector_small constructor */
11 template<CPPL_INT l>
13 {CPPL_VERBOSE_REPORT;
14 #ifdef CPPL_DEBUG
15  if( l!=vec.l ){
16  ERROR_REPORT;
17  std::cerr << "Vector sizes must be the same." << std::endl
18  << "Your input was " << l << " and " << vec.l << "." << std::endl;
19  exit(1);
20  }
21 #endif//CPPL_DEBUG
22 
23  for(CPPL_INT k=0; k<l; k++){
24  array[k] =vec.array[k];
25  }
26 }
27 
28 //=============================================================================
29 /*! zrovector_small constructor */
30 template<CPPL_INT l>
31 inline zrovector_small<l>::zrovector_small(const comple& x, const comple& y)
32 {CPPL_VERBOSE_REPORT;
33 #ifdef CPPL_DEBUG
34  if( l!=2 ){
35  ERROR_REPORT;
36  std::cerr << "The vector size must be 2." << std::endl
37  << "The vector size you set was " << l << "." << std::endl;
38  exit(1);
39  }
40 #endif//CPPL_DEBUG
41 
42  array[0] =x;
43  array[1] =y;
44 }
45 
46 //=============================================================================
47 /*! zrovector_small constructor */
48 template<CPPL_INT l>
49 inline zrovector_small<l>::zrovector_small(const comple& x, const comple& y, const comple& z)
50 {CPPL_VERBOSE_REPORT;
51 #ifdef CPPL_DEBUG
52  if( l!=3 ){
53  ERROR_REPORT;
54  std::cerr << "The vector size must be 3." << std::endl
55  << "The vector size you set was " << l << "." << std::endl;
56  exit(1);
57  }
58 #endif//CPPL_DEBUG
59 
60  array[0] =x;
61  array[1] =y;
62  array[2] =z;
63 }
64 
65 ///////////////////////////////////////////////////////////////////////////////
66 ///////////////////////////////////////////////////////////////////////////////
67 ///////////////////////////////////////////////////////////////////////////////
68 
69 //=============================================================================
70 /*! zrovector_small destructor */
71 template<CPPL_INT l>
73 {CPPL_VERBOSE_REPORT;
74  ;
75 }
CPPL_INT l
vector size
Definition: zrovector.hpp:9
Complex Double-precision Row Vector Class.
Definition: zrovector.hpp:3
comple * array
1D array to store vector data
Definition: zrovector.hpp:10