Container object for linear algebra operations. More...
#include <mvector.hpp>
Public Member Functions | |
VectorLA () | |
Default constructor. | |
VectorLA (const VectorLA &vecla) | |
Copy constructor. | |
VectorLA (const Vector &vec) | |
Constructor for VectorLA with vector vec with coefficient 1. | |
VectorLA (const Vector &vec, double coef) | |
Constructor for VectorLA with vector vec with coefficient coef. | |
double | operator[] (int i) const |
Operator for pointing to elements of linear algebra operations. | |
double | operator() (int i) const |
Operator for pointing to elements of linear algebra operations. | |
VectorLA | operator+ (const VectorLA &vecla) const |
Operator for adding vectors. | |
VectorLA | operator- (const VectorLA &vecla) const |
Operator for subtracting vectors. | |
VectorLA | operator- () const |
Operator for unary minus. | |
VectorLA | operator* (double x) const |
Operator for multiplying vector with a constant. | |
Public Attributes | |
std::vector< VectorRef > | _refs |
List of linear algebra operations. | |
Friends | |
VectorLA | operator* (double x, const VectorLA &vecla) |
Operator for multiplying vector with a constant. |
Container object for linear algebra operations.
This container object is used to build and store a list of coefficients and vectors for linear algebra operations. For more information about the use of VectorLA, see Vector.
Vector::VectorLA::VectorLA | ( | ) | [inline] |
Default constructor.
Vector::VectorLA::VectorLA | ( | const VectorLA & | vecla | ) | [inline] |
Copy constructor.
Vector::VectorLA::VectorLA | ( | const Vector & | vec | ) | [inline] |
Constructor for VectorLA with vector vec with coefficient 1.
Vector::VectorLA::VectorLA | ( | const Vector & | vec, | |
double | coef | |||
) | [inline] |
Constructor for VectorLA with vector vec with coefficient coef.
double Vector::VectorLA::operator() | ( | int | i | ) | const [inline] |
Operator for pointing to elements of linear algebra operations.
Range checking is done for i if SPM_RANGE_CHECK
is defined. Throws MErrorRange exception on range checking errors.
VectorLA Vector::VectorLA::operator* | ( | double | x | ) | const |
Operator for multiplying vector with a constant.
VectorLA Vector::VectorLA::operator- | ( | ) | const |
Operator for unary minus.
Operator for subtracting vectors.
double Vector::VectorLA::operator[] | ( | int | i | ) | const [inline] |
Operator for pointing to elements of linear algebra operations.
Range checking is done for i if SPM_RANGE_CHECK
is defined. Throws MErrorRange exception on range checking errors.
This operator can be used to calculate algebra for only one coordinate of vectors without any excess calculation.
double x = (A-1.3*B)[2]
Operator for multiplying vector with a constant.
std::vector<VectorRef> Vector::VectorLA::_refs |
List of linear algebra operations.