IGLib  1.5
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
IG.Num.IVector Interface Reference

Real vector intrface. More...

+ Inheritance diagram for IG.Num.IVector:

Public Member Functions

IVector GetCopy ()
 Returns a deep copy of the current object. More...
 
IVector GetNew (int length)
 Creates and returns a new vector with the specified dimension, and of the same type as the current vector. More...
 
IVector GetNew ()
 Creates and returns a new vector with the same dimension and of the same type as the current vector. More...
 
IMatrix GetNewMatrix (int rowCount, int columnCount)
 Creates and returns a new matrix with the specified dimensona, and of a type that is consistent with the type of the current vector. More...
 
IMatrix GetNewMatrix ()
 Creates and returns a new matrix of a type that is consistent with the type of the current vector, and with both dimensions equal to the dimension of the current vector. More...
 
void SetConstant (double elementValue)
 Sets all components of the current vector to the specified value. More...
 
void SetUnit (int which)
 Sets the current vector to the specific unit vector (one component equals 1, others are 0). More...
 
void SetRandom ()
 Sets the current vector such that it contains random elements on the interval (0,1]. More...
 
void SetRandom (IRandomGenerator rnd)
 Sets the current vector such that it contains random elements on the interval (0,1]. More...
 
void SetZero ()
 Sets all components of the current vector to 0. More...
 
IVector Normalized ()
 Returns a vector that equals a normalized current vector. More...
 
string ToString ()
 Returns a string representation of this vector in a standard IGLib form (Mathematica-like format but with C representation of numbers). More...
 
string ToStringMath ()
 Returns a string representation of this vector in a standard IGLib form (Mathematica-like format but with C representation of numbers). More...
 
string ToString (string elementFormat)
 Returns a string representation of the current vector in a standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the vector. More...
 
string ToStringMath (string elementFormat)
 Returns a string representation of the current vector in a standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the vector. More...
 
int GetHashFunctionInt ()
 Returns an integer valued hash function of the current vector object. More...
 
string GetHashFunctionString ()
 Returns a string valued hash function of the current vector object. More...
 

Detailed Description

Real vector intrface.

$A Igor Sep08;

Member Function Documentation

IVector IG.Num.IVector.GetNew ( int  length)

Creates and returns a new vector with the specified dimension, and of the same type as the current vector.

Parameters
lengthDimension of the newly created vector.
Returns
A newly created vector of the specified dimension and of the same type as the current vector.

Implemented in IG.Num.VectorBase.

Referenced by IG.Num.VectorBase.Add(), IG.Num.VectorBase.ArrayAdd(), IG.Num.VectorBase.ArrayProduct(), IG.Num.VectorBase.ArrayQuotient(), IG.Num.VectorBase.ArraySubtract(), IG.Num.MatrixBase.CholeskySolve(), IG.Num.VectorBase.Copy(), IG.Num.VectorBase.CrossProduct(), IG.Num.VectorBase.Divide(), IG.Num.ScalarFunctionUntransformedBase.Evaluate(), IG.Num.ScalarFunctionUntransformedBase.Gradient(), IG.Num.ScalarFunctionBase.GradientPlain(), IG.Num.ScalarFunctionRadialUntransformed.GradientPlain(), IG.Num.MatrixBase.LdltSolve(), IG.Num.VectorBase.Multiply(), IG.Num.VectorBase.Negate(), IG.Num.ScalarFunctionUntransformedBase.NumericalGradientCentral(), IG.Num.ScalarFunctionUntransformedBase.NumericalGradientForward(), IG.Num.ScalarFunctionUntransformedBase.NumericalHessianCentral(), IG.Num.ScalarFunctionUntransformedBase.NumericalHessianForward(), IG.Num.VectorBase.OrthogonalizeGramSchmidt(), IG.Num.VectorBase.OrthogonalProjection(), IG.Num.MatrixBase.QrSolve(), IG.Num.ScalarFunctionRadial.ReferenceGradientPlain(), IG.Num.VectorBase.Scale(), IG.Num.RealFunctionParametricBase.SetParameters(), IG.Num.ScalarFunctionParametricBase.SetParameters(), IG.Num.ScalarFunctionRadialParametric.SetParameters(), IG.Num.VectorBase.Subtract(), IG.Num.ScalarFunctionUntransformedBase.Test(), IG.Num.AffineTransformationSquare.TransformBackCoordinates(), IG.Num.AffineTransformationSquare.TransformBackGradient(), IG.Num.AffineTransformationSquare.TransformCoordinates(), and IG.Num.AffineTransformationSquare.TransformGradient().

IVector IG.Num.IVector.GetNew ( )

Creates and returns a new vector with the same dimension and of the same type as the current vector.

Implemented in IG.Num.VectorBase.

IMatrix IG.Num.IVector.GetNewMatrix ( int  rowCount,
int  columnCount 
)

Creates and returns a new matrix with the specified dimensona, and of a type that is consistent with the type of the current vector.

Parameters
rowCountNumber of rows of the returned matrix.
columnCountNumber of rows of the returned matrix.
Returns
A matrix with specified dimensions, whose type is consistent with the type of the current vector.

Implemented in IG.Num.VectorBase.

Referenced by IG.Num.VectorBase.DyadicProduct(), IG.Num.ScalarFunctionUntransformedBase.Evaluate(), IG.Num.ScalarFunctionUntransformedBase.Hessian(), IG.Num.ScalarFunctionBase.HessianPlain(), IG.Num.ScalarFunctionUntransformedBase.NumericalHessianCentral(), and IG.Num.ScalarFunctionUntransformedBase.NumericalHessianForward().

IMatrix IG.Num.IVector.GetNewMatrix ( )

Creates and returns a new matrix of a type that is consistent with the type of the current vector, and with both dimensions equal to the dimension of the current vector.

Implemented in IG.Num.VectorBase.

void IG.Num.IVector.SetConstant ( double  elementValue)

Sets all components of the current vector to the specified value.

Parameters
elementValueValue to which vector elements are set.

Implemented in IG.Num.VectorBase.

Referenced by IG.Num.ScalarFunctionUntransformedBase.TestGradient().

void IG.Num.IVector.SetUnit ( int  which)

Sets the current vector to the specific unit vector (one component equals 1, others are 0).

Parameters
whichSpecifies which unit vector is set (i.e., which component equals 1).

Implemented in IG.Num.VectorBase.

void IG.Num.IVector.SetRandom ( )

Sets the current vector such that it contains random elements on the interval (0,1].

Implemented in IG.Num.VectorBase.

Referenced by IG.Num.SampledDataSet.CreateExampleLinear(), and IG.Num.SampledDataSet.CreateExampleQuadratic().

void IG.Num.IVector.SetRandom ( IRandomGenerator  rnd)

Sets the current vector such that it contains random elements on the interval (0,1].

Parameters
rndRandom generator used to generate vector elements.

Implemented in IG.Num.VectorBase.

IVector IG.Num.IVector.Normalized ( )

Returns a vector that equals a normalized current vector.

Implemented in IG.Num.VectorBase, IG.Num.Vector3d, and IG.Num.Vector2d.

string IG.Num.IVector.ToStringMath ( )

Returns a string representation of this vector in a standard IGLib form (Mathematica-like format but with C representation of numbers).

Implemented in IG.Num.VectorBase.

Referenced by IG.Num.SimKosecFileManagerBase.CalculateVectorResponse(), IG.Num.MatrixBase.TestCholeskyDecompositionDemo(), and IG.Num.MatrixBase.TestLuDecompositionDemo().

string IG.Num.IVector.ToString ( string  elementFormat)

Returns a string representation of the current vector in a standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the vector.

Parameters
elementFormatFormat specification for printing individual element.

Implemented in IG.Num.VectorBase.

string IG.Num.IVector.ToStringMath ( string  elementFormat)

Returns a string representation of the current vector in a standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the vector.

Parameters
elementFormatFormat specification for printing individual element.

Implemented in IG.Num.VectorBase.

int IG.Num.IVector.GetHashFunctionInt ( )

Returns an integer valued hash function of the current vector object.

The returned value is calculated by the Util.GetHashFunctionInt method.

See also
Util.GetHashFunctionInt

Implemented in IG.Num.VectorBase.

string IG.Num.IVector.GetHashFunctionString ( )

Returns a string valued hash function of the current vector object.

The returned value is calculated by the Util.GetHashFunctionString method.

The returned string is always on the same length, and is based on the ToString method. Therefore it is convenient for use in file or directory names that have one part related to a specific vector.

See also
Util.GetHashFunctionString

Implemented in IG.Num.VectorBase.


The documentation for this interface was generated from the following file: