Vector object.
Inheritance:
Public Fields
-
int n
- Size of the vector
-
real* ptr
- Data of the vector
Public Methods
-
Vec(real* ptr_, int n_dim)
- Create a vector from values in ptr_.
-
Vec(int n_dim)
- Create a new vector
-
void copy(Vec* vec, int start_i = 0)
- Copy the vector vec starting from index start_i
-
void zero()
- Zero the matrix
-
real norm1(Vec* weights = NULL)
- Compute the norm1
-
real norm2(Vec* weights = NULL)
- Compute the norm2
-
real normInf()
- Compute the norm inf
-
real iP(Vec* vec, int start_i = 0)
- Inner product of two vectors from start_i downwards
-
Vec* subVec(int dim1, int dim2)
- Return a sub-vector.
Inherited from Object:
Public Fields
-
Allocator* allocator
Public Methods
-
void addOption(const char* name, int size, void* ptr, const char* help="")
-
void addIOption(const char* name, int* ptr, int init_value, const char* help="")
-
void addROption(const char* name, real* ptr, real init_value, const char* help="")
-
void addBOption(const char* name, bool* ptr, bool init_value, const char* help="")
-
void addOOption(const char* name, Object** ptr, Object* init_value, const char* help="")
-
void setOption(const char* name, void* ptr)
-
void setIOption(const char* name, int option)
-
void setROption(const char* name, real option)
-
void setBOption(const char* name, bool option)
-
void setOOption(const char* name, Object* option)
-
virtual void loadXFile(XFile* file)
-
virtual void saveXFile(XFile* file)
-
void load(const char* filename)
-
void save(const char* filename)
-
void* operator new(size_t size, Allocator* allocator_=NULL)
-
void* operator new(size_t size, Allocator* allocator_, void* ptr_)
-
void operator delete(void* ptr)
Documentation
Vector object.
- int n
- Size of the vector
- real* ptr
- Data of the vector
- Vec(real* ptr_, int n_dim)
- Create a vector from values in ptr_.
(No memory copy).
- Vec(int n_dim)
- Create a new vector
- void copy(Vec* vec, int start_i = 0)
- Copy the vector vec starting from index start_i
- void zero()
- Zero the matrix
- real norm1(Vec* weights = NULL)
- Compute the norm1
- real norm2(Vec* weights = NULL)
- Compute the norm2
- real normInf()
- Compute the norm inf
- real iP(Vec* vec, int start_i = 0)
- Inner product of two vectors from start_i downwards
- Vec* subVec(int dim1, int dim2)
- Return a sub-vector.
Note that the memory is shared with the original
vector, so *be carefull*.
- This class has no child classes.
- Author:
- Ronan Collobert (collober@idiap.ch)
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.