Vector class with double precision.
DIVAMatrixExport void | CrossProduct ( const CDVector &v1, const CDVector &v2) Forms the cross product of two vectors. |
DIVAMatrixExport void | ElementDivide (const CDVector& vector) Divide two vectors element-wise. |
DIVAMatrixExport void | ElementMultiply (const CDVector& vector) Multiplies two vectors element-wise. |
DIVAMatrixExport void | Eq (const double B, CDVector& C ) const Equal - compares a vector and a double. |
DIVAMatrixExport void | Eq ( const CDVector& B, CDVector& C ) const Equal - compares a vector and a vector. |
DIVAMatrixExport void | FromFile ( const CDString& sFilename ) Reads a vector from disk in binary format. |
DIVAMatrixExport void | FromFile ( FILE *fh ) Reads a vector from disk in binary format. |
DIVAMatrixExport void | FromMatlab (const CDString& sFilename, const CDString& sName) Reads a vector from disk in MatLab (.m) format. |
DIVAMatrixExport void | Ge ( const CDVector& B, CDVector& C ) const Greater Than or Equal - compares a vector and a vector. |
DIVAMatrixExport void | Ge (const double B, CDVector& C ) const Greater Than or Equal - compares a double and a vector. |
DIVAMatrixExport void | Gt (const double B, CDVector& C ) const Greater Than - compares a double and a vector. |
DIVAMatrixExport void | Gt ( const CDVector& B, CDVector& C ) const Greater Than - compares a vector and a vector. |
DIVAMatrixExport void | Le ( const CDVector& B, CDVector& C ) const Less Than or Equal - compares a vector and a vector. |
DIVAMatrixExport void | Le (const double B, CDVector& C ) const Less Than or Equal - compares a double and a vector. |
DIVAMatrixExport void | Log () Takes the natural logarithm of each element. |
DIVAMatrixExport void | Lt ( const CDVector& B, CDVector& C ) const Less Than - compares a vector and a vector. |
DIVAMatrixExport void | Lt (const double B, CDVector& C ) const Less Than - compares a double and a vector. |
DIVAMatrixExport double | Max () const Finds the maximum element in the vector. |
DIVAMatrixExport double | Mean () const Calculates the mean value of the vector. |
DIVAMatrixExport double | Min () const Finds the minimum element in the vector. |
DIVAMatrixExport double | Min (int& iPos) const Finds the minimum element in the vector and its position. |
DIVAMatrixExport void | Ne ( const CDVector& B, CDVector& C ) const Not Equal - compares a vector and a vector. |
DIVAMatrixExport void | Ne (const double B, CDVector& C ) const Not Equal - compares a double and a vector. |
DIVAMatrixExport double | Norm1 () const Calculates the one-norm (L1) of the vector. |
DIVAMatrixExport double | Norm2 () const Calculates the two-norm (L2) of the vector. |
DIVAMatrixExport double | NormInf () const Calculates the infinity-norm (Linf) of the vector. |
DIVAMatrixExport void | Normalize2 () Normalizes the vector to unit length, using the 2-norm. |
DIVAMatrixExport void | Pow (double dP) Takes the power 'dP' of each element. |
DIVAMatrixExport void | Rand () Uniformly distributed random numbers. |
DIVAMatrixExport void | Reverse () Reverses the vector. |
DIVAMatrixExport double | Skewness () const Calculates the skewness of the vector. |
DIVAMatrixExport void | Sort ( bool ascending ) Sorts the vector. |
DIVAMatrixExport void | Sqr () Squares each element. |
DIVAMatrixExport void | Sqrt () Takes the square root of each element. |
DIVAMatrixExport double | Std () const Calculates the standard deviation of the vector. |
DIVAMatrixExport double | Sum () const Calculates the sum of the vector. |
DIVAMatrixExport void | ToFile ( const CDString& sFilename ) const Writes the vector to disk in binary format. |
DIVAMatrixExport void | ToFile ( FILE *fh ) const Writes the vector to disk in binary format. |
DIVAMatrixExport void | ToMatlab (const CDString& sFilename, const CDString& sName, const CDString& sComment, bool fAppend) const Writes the vector to disk in MatLab (.m) format. |
DIVAMatrixExport CDString | ToString (const bool fNewline) const Returns a string representing the vector. |
DIVAMatrixExport double | Var () const Calculates the variance of the vector. |
DIVAMatrixExport CDVector& | operator= (double value) Assignment operator. |
DIVAMatrixExport CDVector& | operator= (const CVisDVector &vIn) Assignment operator. |
DIVAMatrixExport CDVector& | operator= (const CDVector &vIn) Assignment operator. |
Vector class with double precision based upon the VisSDK vector class CVisDVector.
Forms the cross product of two vectors and store the result in this. If the vector does have the correct size, it will be resized.
Divide two vectors element-wise.
Corresponding MatLab operator "./".
Multiplies two vectors element-wise.
Corresponding MatLab operator ".*".
Compares of a vector and a double and returns
the result as a binary vector i.e.: C(i) = 1 if A(i) == B
C(i) = 0 else Corresponding MatLab function EQ()
Compares of a vector and a vector and returns
the result as a binary matrix i.e.: C(i) = 1 if A(i) == B
C(i) = 0 else Corresponding MatLab function EQ()
Reads a vector from disk in binary format.
Reads a vector from disk in binary format.
Reads a vector from disk in MatLab (.m) format into
'this'. Notice that this should be used for storage a (really)
large vectors, due to the computational and i/o overhead
induced by the simple MatLab text format. Also, remember that MatLab can't read (.m) files with lines
longer than 4096 bytes. If no communication with MatLab is needed, but merely
to/from disk functionality within a DIVA program, it is
suggested to use the fast binary i/o methods ToFile() and
FromFile().
Compares of a double and a vector and returns
the result as a binary matrix i.e.: C(i) = 1 if A(i) >= B
C(i) = 0 else Corresponding MatLab function GE()
Compares of a vector and a vector and returns
the result as a binary matrix i.e.: C(i) = 1 if A(i) >= B
C(i) = 0 else Corresponding MatLab function GE()
Compares of a double and a vector and returns
the result as a binary matrix i.e.: C(i) = 1 if A(i) > B
C(i) = 0 else Corresponding MatLab function GT()
Compares of a vector and a vector and returns
the result as a binary matrix i.e.: C(i) = 1 if A(i) > B
C(i) = 0 else Corresponding MatLab function GT()
Compares of a double and a vector and returns
the result as a binary matrix i.e.: C(i) = 1 if A(i) <= B
C(i) = 0 else Corresponding MatLab function LE()
Compares of a vector and a vector and returns
the result as a binary matrix i.e.: C(i) = 1 if A(i) <= B
C(i) = 0 else Corresponding MatLab function LE()
Takes the natural logarithm of each element.
Compares of a double and a vector and returns
the result as a binary matrix i.e.: C(i) = 1 if A(i) < B
C(i) = 0 else Corresponding MatLab function LT()
Compares of a vector and a vector and returns
the result as a binary matrix i.e.: C(i) = 1 if A(i) < B
C(i) = 0 else Corresponding MatLab function LT()
Finds the maximum element in the vector.
Calculates the mean value of the vector.
Finds the minimum element in the vector.
Finds the minimum element in the vector and its position.
Compares of a double and a vector and returns
the result as a binary matrix i.e.: C(i) = 1 if A(i) != B
C(i) = 0 else Corresponding MatLab function NE()
Compares of a vector and a vector and returns
the result as a binary matrix i.e.: C(i) = 1 if A(i) != B
C(i) = 0 else Corresponding MatLab function NE()
Calculates the one-norm (L1) of the vector.
Also known as the city block metric. L1(v) = |x_1| + |x_2| .. + |x_n|
Calculates the two-norm (L2) of the vector.
Also known as the Euclidean length. L2(v) = sqrt( x_1^2 + x_2^2 .. + x_n^2 )
Calculates the infinity-norm (Linf) of the vector.
Also known as the Chebyshev Norm. Linf(v) = max( |x_1|, |x_2| ... , |x_n| )
Normalizes the vector to unit length, using the 2-norm.
Takes the power 'dP' of each element.
Inserts uniformly distributed random numbers in
the range [0;1].
Reverses the vector.
Calculates the skewness the vector.
Sorts the vector in either ascending (default) or descending order.
Implemented using the standard quicksort, qsort().
Squares each element.
Takes the square root of each element.
Calculates the standard deviation the vector.
Calculates the sum of the vector.
Writes the vector to disk in binary format.
Use 'readbin.m' to load such a file into MatLab
(placed in the diva/matlab dir).
Writes the vector to disk in binary format.
Use 'readbin.m' to load such a file into MatLab
(placed in the diva/matlab dir).
Writes the vector to disk in MatLab (.m) format.
To read the vector into MatLab write e.g.
'my_vector.m' at the MatLab prompt. Notice that this should be used for storage a (really)
large vectors, due to the computational and i/o overhead
induced by the simple MatLab text format. Also, remember that MatLab can't read (.m) files with lines
longer than 4096 bytes. If no communication with MatLab is needed, but merely
to/from disk functionality within a DIVA program, it is
suggested to use the fast binary i/o methods ToFile() and
FromFile().
Returns a string representing the vector.
Calculates the variance the vector.
Assignment operator.
Assignment operator.
Assignment operator. Sets all element to the input value.
C - Output result vector.
C - Output result vector.
sName - The name to search for (and load) inside the matlab file.
C - Output result vector.
C - Output result vector.
C - Output result vector.
C - Output result vector.
C - Output result vector.
C - Output result vector.
C - Output result vector.
C - Output result vector.
C - Output result vector.
C - Output result vector.
sName - Name of destination matlab variable.
sComment - Optional comment inside the file.
fAppend - If true, the vector is appended to the file
'sFilename'.
Back | DIVA Reference Manual | The DIVA-Site |