Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Data Structures
math_Vector.hxx File Reference
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>
#include <Standard_Integer.hxx>
#include <math_SingleTabOfReal.hxx>
#include <Standard_Real.hxx>
#include <Standard_Address.hxx>
#include <Standard_OStream.hxx>
#include <math_Vector.lxx>

Data Structures

class  math_Vector
 This class implements the real vector abstract data type.
Vectors can have an arbitrary range which must be defined at
the declaration and cannot be changed after this declaration.
math_Vector V1(-3, 5); // a vector with range [-3..5]

Vector are copied through assignement :
math_Vector V2( 1, 9);
....
V2 = V1;
V1(1) = 2.0; // the vector V2 will not be modified.

The Exception RangeError is raised when trying to access outside
the range of a vector :
V1(11) = 0.0 // --> will raise RangeError;

The Exception DimensionError is raised when the dimensions of two
vectors are not compatible :
math_Vector V3(1, 2);
V3 = V1; // --> will raise DimensionError;
V1.Add(V3) // --> will raise DimensionError;
More...