Class xlifepp::Vector#
-
template<typename K>
class Vector : public std::vector<K>#
-
to deal with numeric vector (say real or complex vector).
may be used for vector of vectors but restricted usage
Subclassed by xlifepp::VectorEigenDense< K >
Public Functions
-
inline Vector()#
-
default constructor
-
inline Vector(cit_vk b, cit_vk e)#
-
constructor by iterator
-
Vector(const std::vector<complex_t>&)#
-
specialization vector<real>(vector<complex>)
-
Vector(const std::vector<complex_t> &x)
-
abusive specialization of complex to real (real part is cast)
-
template<typename KK>
inline explicit Vector(const std::vector<KK> &v)#
-
- Parameters:
-
v – vector<K>(vector<KK>)
-
Vector(const std::vector<real_t>&)#
-
specialization vector<complex>(vector<real>)
-
Vector(const std::vector<real_t> &x)
-
specialization vector<real> -> vector<complex>
-
Vector(const std::vector<Vector<complex_t>>&)#
-
specialization vector<vector<real>>=vector<vector<complex>>
-
Vector(const std::vector<Vector<complex_t>> &x)
-
abusive specialization of complex to real (real part is cast)
-
template<typename KK>
inline explicit Vector(const std::vector<Vector<KK>> &v)#
-
- Parameters:
-
v – vector<K>(std::vector<vector<KK>>)
-
Vector(const std::vector<Vector<real_t>>&)#
-
specialization vector<vector<complex>>=vector<vector<real>>
-
Vector(const std::vector<Vector<real_t>> &x)
-
specialization vector<vector<real_t>> -> vector<vector<complex_t>>
-
inline explicit Vector(int l)#
-
constructor by length
-
inline void complexCastError(const string_t &s, const number_t sz) const#
-
error: try to cast a complex to a real
-
inline void divideByZero(const string_t &s) const#
-
error: divide by 0 in vector operation s vector dimension dim(op1)
-
inline number_t elementSize() const
-
return size of element of a matrix of matrices or a matrix of vectors (size of first block!)
-
inline void mismatchSize(const string_t &s, const size_t sz) const#
-
error: in vector operation s dimensions disagree dim(op1)= … dim(op2)=…
-
inline real_t norm1() const#
-
l1 norm
-
inline real_t norm2() const#
-
quadratic norm
-
inline real_t norm2squared() const#
-
squared quadratic norm
-
inline real_t norminfty() const#
-
sup norm
-
inline Vector<K> operator()(const std::vector<number_t> &is) const#
-
return ‘is’ components as vector
-
Vector<real_t> &operator*=(const complex_t &vc)
-
specialization vector<real>*=complex
-
Vector<complex_t> &operator+=(const Vector<real_t> &x)
-
operations are not specialized for complex to real, cast with constructor before: x+Vector(z) or do real(z+x)
vector addition
-
Vector<Vector<complex_t>> &operator+=(const Vector<Vector<real_t>>&)#
-
specialization vector<vector<complex>>+=vector<vector<real>>
-
Vector<Vector<complex_t>> &operator-=(const Vector<Vector<real_t>>&)#
-
specialization vector<vector<complex>>-=vector<vector<real>>
-
Vector<real_t> &operator=(const Vector<complex_t> &x)
-
abusive specialization of complex to real (real part is cast)
-
Vector<Vector<real_t>> &operator=(const Vector<Vector<complex_t>>&)#
-
specialization vector<vector<real>>=vector<vector<complex>>
-
Vector<Vector<real_t>> &operator=(const Vector<Vector<complex_t>> &x)
-
abusive specialization of complex to real (real part is cast)
-
Vector<Vector<complex_t>> &operator=(const Vector<Vector<real_t>>&)#
-
specialization vector<vector<complex>>=vector<vector<real>>
-
Vector<Vector<complex_t>> &operator=(const Vector<Vector<real_t>> &x)
-
specialization vector<vector<complex>>=vector<vector<real>>
-
inline void print() const#
-
write to default file stream
-
inline void print(std::ostream &os) const#
-
write to a output stream
-
inline void printRaw(std::ostream &os) const#
-
print in a raw format to stream
-
inline void printRaw(std::ostream &os) const
-
print in a raw format (1 column)
-
inline void printRaw(std::ostream &os) const
-
print in a raw format (2 columns)
-
inline void printRaw(std::ostream &os) const
-
print in a raw format (N columns)
-
inline void printRaw(std::ostream &os) const
-
print in a raw format (2N columns)
-
inline Vector<K> &roundToZero(real_t aszero = std::sqrt(theEpsilon))#
-
round to 0 all coefficients smaller (in norm) than a aszero, storage is not modified
-
inline void set(const std::vector<number_t> &is, const std::vector<K> &vec)#
-
set ‘is’ components of current vector
-
inline void set(number_t i1, number_t i2, const std::vector<K> &vec)#
-
set i1->i2 components of current vector
-
inline size_t size() const#
-
overloaded size
-
inline StrucType strucType() const
-
get structure type of matrix using template specialization
-
inline ValueType valueType() const
-
get value type of matrix using template specialization
-
inline Vector()#