CPPLapack
 All Classes Files Functions Variables Friends Pages
Functions
zcovector-zcovector.hpp File Reference

Go to the source code of this file.

Functions

_zcovector operator+ (const zcovector &vecA, const zcovector &vecB)
 
_zcovector operator- (const zcovector &vecA, const zcovector &vecB)
 
comple operator% (const zcovector &vecA, const zcovector &vecB)
 
_zcovector hadamerd (const zcovector &vecA, const zcovector &vecB)
 

Function Documentation

_zcovector operator+ ( const zcovector vecA,
const zcovector vecB 
)
inline

zcovector+zcovector operator

Definition at line 61 of file zcovector-zcovector.hpp.

References _(), zcovector::array, i(), and zcovector::l.

62 {CPPL_VERBOSE_REPORT;
63 #ifdef CPPL_DEBUG
64  if(vecA.l!=vecB.l){
65  ERROR_REPORT;
66  std::cerr << "These two vectors can not make a sumation." << std::endl
67  << "Your input was (" << vecA.l << ") + (" << vecB.l << ")." << std::endl;
68  exit(1);
69  }
70 
71 #endif//CPPL_DEBUG
72 
73  zcovector newvec(vecA.l);
74 
75  for(CPPL_INT i=0; i<newvec.l; i++){
76  newvec.array[i] =vecA.array[i]+vecB.array[i];
77  }
78 
79  return _(newvec);
80 }
comple * array
1D array to store vector data
Definition: zcovector.hpp:10
CPPL_INT l
vector size
Definition: zcovector.hpp:9
_dgematrix i(const _dgbmatrix &mat)
Complex Double-precision Column Vector Class.
Definition: zcovector.hpp:3
_dcovector _(dcovector &vec)
_zcovector operator- ( const zcovector vecA,
const zcovector vecB 
)
inline

zcovector-zcovector operator

Definition at line 84 of file zcovector-zcovector.hpp.

References _(), zcovector::array, i(), and zcovector::l.

85 {CPPL_VERBOSE_REPORT;
86 #ifdef CPPL_DEBUG
87  if(vecA.l!=vecB.l){
88  ERROR_REPORT;
89  std::cerr << "These two vectors can not make a subtraction." << std::endl
90  << "Your input was (" << vecA.l << ") - (" << vecB.l << ")." << std::endl;
91  exit(1);
92  }
93 #endif//CPPL_DEBUG
94 
95  zcovector newvec(vecA.l);
96 
97  for(CPPL_INT i=0; i<newvec.l; i++){
98  newvec.array[i] =vecA.array[i]-vecB.array[i];
99  }
100 
101  return _(newvec);
102 }
comple * array
1D array to store vector data
Definition: zcovector.hpp:10
CPPL_INT l
vector size
Definition: zcovector.hpp:9
_dgematrix i(const _dgbmatrix &mat)
Complex Double-precision Column Vector Class.
Definition: zcovector.hpp:3
_dcovector _(dcovector &vec)
comple operator% ( const zcovector vecA,
const zcovector vecB 
)
inline

zcovector^T*zcovector operator (inner product)

Definition at line 106 of file zcovector-zcovector.hpp.

References zcovector::array, and zcovector::l.

107 {CPPL_VERBOSE_REPORT;
108 #ifdef CPPL_DEBUG
109  if(vecA.l!=vecB.l){
110  ERROR_REPORT;
111  std::cerr << "These two vectors can not make a dot product." << std::endl
112  << "Your input was (" << vecA.l << ") % (" << vecB.l << ")." << std::endl;
113  exit(1);
114  }
115 #endif//CPPL_DEBUG
116 
117  CPPL_INT inc =1;
118  comple val =zdotu_( &vecA.l, vecA.array, &inc, vecB.array, &inc );
119 
120  return val;
121 }
comple * array
1D array to store vector data
Definition: zcovector.hpp:10
CPPL_INT l
vector size
Definition: zcovector.hpp:9
_zcovector hadamerd ( const zcovector vecA,
const zcovector vecB 
)
inline

return Hadamerd product

Definition at line 129 of file zcovector-zcovector.hpp.

References _(), i(), and zcovector::l.

130 {CPPL_VERBOSE_REPORT;
131 #ifdef CPPL_DEBUG
132  if( vecA.l!=vecB.l ){
133  ERROR_REPORT;
134  std::cerr << "These two vectors can not make Hadamerd product." << std::endl
135  << "Your input was (" << vecA.l << ") and (" << vecB.l << ")." << std::endl;
136  exit(1);
137  }
138 #endif//CPPL_DEBUG
139 
140  zcovector newvec(vecA.l);
141 
142  for(CPPL_INT i=0; i<newvec.l; i++){
143  newvec(i) =vecA(i)*vecB(i);
144  }
145 
146  return _(newvec);
147 }
CPPL_INT l
vector size
Definition: zcovector.hpp:9
_dgematrix i(const _dgbmatrix &mat)
Complex Double-precision Column Vector Class.
Definition: zcovector.hpp:3
_dcovector _(dcovector &vec)