CPPLapack
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Friends
Pages
include
small
zcovector_small-constructors.hpp
Go to the documentation of this file.
1
//=============================================================================
2
/*! zcovector_small constructor */
3
template
<CPPL_INT l>
4
inline
zcovector_small<l>::zcovector_small
()
5
{CPPL_VERBOSE_REPORT;
6
;
7
}
8
9
//=============================================================================
10
/*! zcovector_small constructor */
11
template
<CPPL_INT l>
12
inline
zcovector_small<l>::zcovector_small
(
const
zcovector
& vec)
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
/*! zcovector_small constructor */
30
template
<CPPL_INT l>
31
inline
zcovector_small<l>::zcovector_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
/*! zcovector_small constructor */
48
template
<CPPL_INT l>
49
inline
zcovector_small<l>::zcovector_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
/*! zcovector_small destructor */
71
template
<CPPL_INT l>
72
inline
zcovector_small<l>::~zcovector_small
()
73
{CPPL_VERBOSE_REPORT;
74
;
75
}
zcovector::array
comple * array
1D array to store vector data
Definition:
zcovector.hpp:10
zcovector::l
CPPL_INT l
vector size
Definition:
zcovector.hpp:9
zcovector_small::zcovector_small
zcovector_small()
Definition:
zcovector_small-constructors.hpp:4
zcovector_small::~zcovector_small
~zcovector_small()
Definition:
zcovector_small-constructors.hpp:72
zcovector
Complex Double-precision Column Vector Class.
Definition:
zcovector.hpp:3
Generated by
1.8.6