67 virtual vector<Type>
toSTL()
const;
91 virtual bool isNaN()
const = 0;
97 virtual const Type&
operator[](
int n)
const = 0;
102 virtual string className()
const {
return string(
"CVector"); };
IO_MODE
Definition: CObject.h:38
virtual string className() const
Returns the class name.
Definition: CVector.h:102
Type euclideanDistance(const CVector< Type > &, bool b=false) const
virtual int getNumNonZero() const =0
returns the number of non-zero entries
Definition: CDenseVector.h:35
static const CVectorOperations< Type > & op_table
Definition: CVector.h:56
CVector< Type > & operator*=(const CVector< Type > &)
multiply vectors elementwise
virtual vector< Type > toSTL() const
Sparse, immutable vector representation.
Definition: CSparseVector.h:42
CVector< Type > & operator/=(const CVector< Type > &)
divide vectors elementwise
virtual CVector< double > * toDouble() const =0
create a copy with every element stored as 'double'
virtual const Type & operator[](int n) const =0
return constant reference to n'th vector element
virtual CDenseVector< int > sort()=0
virtual bool operator==(const CVector< Type > &rhs) const
returns true if rhs has the same elements
Template object for vectors of single and double precision and integer.
Definition: CDenseVector.h:37
Type coCosineDistance(const CVector< Type > &) const
returns common cosine distance of the two vectors
templatized vector for numerical applications
Definition: CMatrix.h:39
Base class for all object.
Definition: CObject.h:51
void adaptToVec(const CVector< Type > &, float fEps1, float fEps2)
virtual bool serialize(fstream &stream, IO_MODE mode)
Read/write from binary stream.
virtual bool isNaN() const =0
returns true if vector contains nan elements
virtual ~CVector()
Definition: CVector.h:59
virtual Type euclideanLength(bool bQuad=false) const =0
returns euclidean length of vector
Type operator*(const CVector< Type > &) const
scalar product with vector
virtual Type getElement(int n) const =0
return copy of n'th vector element
virtual CVector< Type > * clone() const =0
destructor
virtual CVector< float > * toFloat() const =0
create a copy with every element stored as 'float'
virtual int dimension(void) const =0
return vector dimension