Public Member Functions |
DEFINE_STANDARD_ALLOC | math_Vector (const Standard_Integer Lower, const Standard_Integer Upper) |
| Contructs a non-initialized vector in the range [Lower..Upper]
Lower and Upper are the indexes of the lower and upper
bounds of the constructed vector.
|
| math_Vector (const Standard_Integer Lower, const Standard_Integer Upper, const Standard_Real InitialValue) |
| Contructs a vector in the range [Lower..Upper]
whose values are all initialized with the value InitialValue..
|
| math_Vector (const Standard_Address Tab, const Standard_Integer Lower, const Standard_Integer Upper) |
| Constructs a vector in the range [Lower..Upper]
with the "c array" Tab.
|
void | Init (const Standard_Real InitialValue) |
| Initialize all the elements of a vector with InitialValue.
|
| math_Vector (const math_Vector &Other) |
| Constructs a copy for initialization.
An exception is raised if the lengths of the vectors are
different.
|
Standard_Integer | Length () const |
| Returns the length of a vector
|
Standard_Integer | Lower () const |
| Returns the value of the Lower index of a vector.
|
Standard_Integer | Upper () const |
| Returns the value of the Upper index of a vector.
|
Standard_Real | Norm () const |
| Returns the value or the square of the norm of this vector.
|
Standard_Real | Norm2 () const |
| Returns the value of the square of the norm of a vector.
|
Standard_Integer | Max () const |
| Returns the value of the Index of the maximum element of a vector.
|
Standard_Integer | Min () const |
| Returns the value of the Index of the minimum element of a vector.
|
void | Normalize () |
| Normalizes this vector (the norm of the result
is equal to 1.0) and assigns the result to this vector
Exceptions
Standard_NullValue if this vector is null (i.e. if its norm is
less than or equal to Standard_Real::RealEpsilon().
|
math_Vector | Normalized () const |
| Normalizes this vector (the norm of the result
is equal to 1.0) and creates a new vector
Exceptions
Standard_NullValue if this vector is null (i.e. if its norm is
less than or equal to Standard_Real::RealEpsilon().
|
void | Invert () |
| Inverts this vector and assigns the result to this vector.
|
math_Vector | Inverse () const |
| Inverts this vector and creates a new vector.
|
void | Set (const Standard_Integer I1, const Standard_Integer I2, const math_Vector &V) |
| sets a vector from <I1> to <I2> to the vector <V>;
An exception is raised if I1<LowerIndex or I2>UpperIndex or I1>I2.
An exception is raised if I2-I1+1 is different from the Length of V.
|
math_Vector | Slice (const Standard_Integer I1, const Standard_Integer I2) const |
| Creates a new vector by inverting the values of this vector
between indexes I1 and I2.
If the values of this vector were (1., 2., 3., 4.,
5., 6.), by slicing it between indexes 2 and 5 the
values of the resulting vector are (1., 5., 4., 3., 2., 6.)
|
void | Multiply (const Standard_Real Right) |
| returns the product of a vector and a real value.
|
void | operator*= (const Standard_Real Right) |
math_Vector | Multiplied (const Standard_Real Right) const |
| returns the product of a vector and a real value.
|
math_Vector | operator* (const Standard_Real Right) const |
math_Vector | TMultiplied (const Standard_Real Right) const |
| returns the product of a vector and a real value.
|
void | Divide (const Standard_Real Right) |
| divides a vector by the value <Right>.
An exception is raised if <Right> = 0.
|
void | operator/= (const Standard_Real Right) |
math_Vector | Divided (const Standard_Real Right) const |
| divides a vector by the value <Right>.
An exception is raised if <Right> = 0.
|
math_Vector | operator/ (const Standard_Real Right) const |
void | Add (const math_Vector &Right) |
| adds the vector <Right> to a vector.
An exception is raised if the vectors have not the same length.
Warning
In order to avoid time-consuming copying of vectors, it
is preferable to use operator += or the function Add whenever possible.
|
void | operator+= (const math_Vector &Right) |
math_Vector | Added (const math_Vector &Right) const |
| adds the vector <Right> to a vector.
An exception is raised if the vectors have not the same length.
An exception is raised if the lengths are not equal.
|
math_Vector | operator+ (const math_Vector &Right) const |
void | Multiply (const math_Vector &Left, const math_Matrix &Right) |
| sets a vector to the product of the vector <Left>
with the matrix <Right>.
|
void | Multiply (const math_Matrix &Left, const math_Vector &Right) |
| sets a vector to the product of the matrix <Left>
with the vector <Right>.
|
void | TMultiply (const math_Matrix &TLeft, const math_Vector &Right) |
| sets a vector to the product of the transpose
of the matrix <TLeft> by the vector <Right>.
|
void | TMultiply (const math_Vector &Left, const math_Matrix &TRight) |
| sets a vector to the product of the vector
<Left> by the transpose of the matrix <TRight>.
|
void | Add (const math_Vector &Left, const math_Vector &Right) |
| sets a vector to the sum of the vector <Left>
and the vector <Right>.
An exception is raised if the lengths are different.
|
void | Subtract (const math_Vector &Left, const math_Vector &Right) |
| sets a vector to the Subtraction of the
vector <Right> from the vector <Left>.
An exception is raised if the vectors have not the same length.
Warning
In order to avoid time-consuming copying of vectors, it
is preferable to use operator -= or the function
Subtract whenever possible.
|
Standard_Real & | Value (const Standard_Integer Num) const |
| accesses (in read or write mode) the value of index Num of
a vector.
|
Standard_Real & | operator() (const Standard_Integer Num) const |
math_Vector & | Initialized (const math_Vector &Other) |
| Initialises a vector by copying <Other>.
An exception is raised if the Lengths are differents.
|
math_Vector & | operator= (const math_Vector &Other) |
Standard_Real | Multiplied (const math_Vector &Right) const |
| returns the inner product of 2 vectors.
An exception is raised if the lengths are not equal.
|
Standard_Real | operator* (const math_Vector &Right) const |
math_Vector | Multiplied (const math_Matrix &Right) const |
| returns the product of a vector by a matrix.
|
math_Vector | operator* (const math_Matrix &Right) const |
math_Vector | Opposite () |
| returns the opposite of a vector.
|
math_Vector | operator- () |
void | Subtract (const math_Vector &Right) |
| returns the subtraction of <Right> from <me>.
An exception is raised if the vectors have not the same length.
|
void | operator-= (const math_Vector &Right) |
math_Vector | Subtracted (const math_Vector &Right) const |
| returns the subtraction of <Right> from <me>.
An exception is raised if the vectors have not the same length.
|
math_Vector | operator- (const math_Vector &Right) const |
void | Multiply (const Standard_Real Left, const math_Vector &Right) |
| returns the multiplication of a real by a vector.
<me> = <Left> * <Right>
|
void | Dump (Standard_OStream &o) const |
| Prints information on the current state of the object.
Is used to redefine the operator <<.
|
Protected Member Functions |
void | SetLower (const Standard_Integer Lower) |
| Is used internally to set the Lower value of the vector.
|
Friends |
math_Vector | operator* (const Standard_Real Left, const math_Vector &Right) |