33 #ifndef VECTOR_INTERFACE_H_
34 #define VECTOR_INTERFACE_H_
36 template <
typename TValueType>
59 bool resize(
size_t new_length,
bool bCopyValues=
true);
73 template <
typename V>
bool add(
const V& u);
74 template <
typename V>
bool set(
const V& u);
75 template <
typename V>
bool get(V& u)
const;
116 template<
typename TValueType>
Definition: vector_interface.h:38
bool set_random(double from, double to)
Vector(size_t _length)
constructor with length
bool operator*=(const number &a)
value_type & operator[](size_t i)
access element i of the vector
double norm() const
return sqrt(sum values[i]^2) (euclidian norm)
bool set(double d)
assign double d to whole Vector
bool resize(size_t new_length, bool bCopyValues=true)
resize vector
void operator-=(const Vector &v)
void operator+=(const Vector &v)
TValueType value_type
Definition: vector_interface.h:40
Vector< TValueType > vector_type
Definition: vector_interface.h:42
Vector(const vector_type &v)
size_t size_type
Definition: vector_interface.h:43
double dotprod(const Vector &w)
returns v.T w, that is the dotprod of this vector and w
double operator=(double d)
assign double d to whole Vector
double number
Definition: types.h:124
bool CloneVector(Vector< TValueType > &dest, const Vector< TValueType > src)
Definition: vector_interface.h:117