CDVectorBasic |
The CDVectorBasic class provides double-precision matrix/vector operations. It contains different basic vector operations.
Constructors/Destructor |
CDVectorBasic (void)
Creates a vector instance, but does not initialize it.CDVectorBasic
(int length,
double *storage = 0)
Creates a dynamically sized double-precision vector with length elements.If storage is zero, new memory is allocated. If storage is not zero, use the memory pointed to by storage.
CDVectorBasic (const CDVectorBasic &vec)
Creates a vector instance with the number of elements and element values of vector vec.
Argument Description length number of elements in vector storage pointer to previously allocated memory vec reference to a vector ~CDVectorBasic (void)
Destructor.
Methods |
Vector Manipulations |
void ElementDivide(const CDVectorBasic& vector)Divide each element in the vector with the corresponding element of the input vector.
Argument Description vector reference to the input vector
CDVectorBasic::ElementMultiply
void ElementMultiply(const CDVectorBasic& vector)CDVectorBasic::Normalize2Multiply each element in the vector with the corresponding element of the input vector.
Argument Description vector reference to the input vector
void Normed2()CDVectorBasic::Norm2Normalize the vector to unit length, using the 2-norm.
double Norm2()CDVectorBasic::PowCalculates the 2-norm of a vector
void Pow(double dP)Take the power of each pixel
Argument Description dP power
void Sqr()Square each element
double Sqrt()Take the square root of each element
Miscellaneous |
void ToString(CString& strOut)This function returns a string representing the vector.
Argument Description strOut reference to the string
Overloaded Operators |
CDVectorBasic::operator=
CDVectorBasic& operator= (double value)
Assigns value to all elements of this vector.CDVectorBasic& operator= (const CDVectorBasic& vec)
Copies the values of another vector to the corresponding elements of this vector.
Argument Description value value to be assigned to this vector's elements vec reference to vector with values to be copied
Copyright, 1999
Section for Image Analysis
Department of Mathematical
Modelling
Technical University of
Denmark
DK-2800 Lyngby
Authors: Rune Fisker
Last updated: 03-05-1999