DesignForms
TVector Class Reference

Implementation of scalar vector More...

Inherits IMyList.

Inherited by TVector2D, and TVector3D.

Public Member Functions

 TVector (int size)
 Constructor More...
 
 TVector (object[] _Components)
 Constructor More...
 
List< double > GetComponents ()
 Return values of the vector components More...
 
double GetComponent (double index)
 Return value of the component on the position given by index More...
 
void InsertComponent (double value)
 Insert new value at the end of the vector. This command will change the size of the vector. More...
 
void InsertComponentOnPos (double index, double value)
 Insert new component on the position given by index. More...
 
void AddVector (TVector vector)
 Add the vector. Each component of the result is sum of components of current and new vector More...
 
void AddScalar (double value)
 Add scalar value to each component of the vector More...
 
void SubstractVector (TVector vector)
 Subtract given vector from current one More...
 
void SubtractScalar (double value)
 Subtract given scalar from each component of the vector More...
 
void MultipleByScalar (double value)
 Multiply each component of the vector by the scalar value More...
 
void DivideByScalar (double value)
 Divide each component of the vector by the scalar value More...
 
double DotProduct (TVector vector)
 Dot product of current vector and vector passed as a parameter More...
 
Boolean CompareVector (TVector vector)
 Compare given vector and vector passed as a parameter More...
 
TVector CrossProduct (TVector vector)
 Cross production of current vector and vector passed as a parameter More...
 
double EuclidNorm ()
 
double Lenght ()
 
TVector Normalize ()
 Return vector with normalized length = 1 More...
 
TMatrix DyadicMultiplication (TVector vector)
 
void Zero ()
 
TVector Clone ()
 Return deep clone of the vector More...
 

Properties

double this[int index] [get, set]
 Return value of vector component More...
 

Detailed Description

Implementation of scalar vector

Constructor & Destructor Documentation

TVector ( int  size)

Constructor

Parameters
sizeDimension of vector
TVector ( object[]  _Components)

Constructor

Parameters
_ComponentsInitial values of vector components

Member Function Documentation

void AddScalar ( double  value)

Add scalar value to each component of the vector

Parameters
valueScalar value to be added to each component of the vector
void AddVector ( TVector  vector)

Add the vector. Each component of the result is sum of components of current and new vector

Parameters
vectorVector to be added
TVector Clone ( )

Return deep clone of the vector

Returns
Deep clone of the vector
Boolean CompareVector ( TVector  vector)

Compare given vector and vector passed as a parameter

Parameters
vectorVector to compare
Returns
TRUE, if vectors are the same. Otherwise FALSE
TVector CrossProduct ( TVector  vector)

Cross production of current vector and vector passed as a parameter

Parameters
vectorSecond vector of cross production
Returns
Cross production of the current vector and parameter
void DivideByScalar ( double  value)

Divide each component of the vector by the scalar value

Parameters
valueDivider
double DotProduct ( TVector  vector)

Dot product of current vector and vector passed as a parameter

Parameters
vectorVector used in dot production
Returns
Dot production of the current vector and parameter
TMatrix DyadicMultiplication ( TVector  vector)

Parameters
vector
Returns
double EuclidNorm ( )

Returns
double GetComponent ( double  index)

Return value of the component on the position given by index

Parameters
indexPosition of desired component
Returns
Value of component on the position given by index
List<double> GetComponents ( )

Return values of the vector components

Returns
List of vector values
void InsertComponent ( double  value)

Insert new value at the end of the vector. This command will change the size of the vector.

Parameters
valueValue of the new component
void InsertComponentOnPos ( double  index,
double  value 
)

Insert new component on the position given by index.

Parameters
indexPosition on which the new component will be inserted
valueValue of the new component
double Lenght ( )

Returns
void MultipleByScalar ( double  value)

Multiply each component of the vector by the scalar value

Parameters
valueMultiplicator
TVector Normalize ( )

Return vector with normalized length = 1

Returns
Normalized vector with length = 1
void SubstractVector ( TVector  vector)

Subtract given vector from current one

Parameters
vectorVector to be subtracted
void SubtractScalar ( double  value)

Subtract given scalar from each component of the vector

Parameters
valueValue to be subtracted
void Zero ( )

Property Documentation

double this[int index]
getset

Return value of vector component

Parameters
indexIndex of the component
Returns
Value of the component at the positition given by Index