#include <jive/algebra/MPVectorSpace.h>
jive::algebra::MPVectorSpace::MPVectorSpace |
( |
| ) |
|
jive::algebra::MPVectorSpace::MPVectorSpace |
( |
const Ref< Super > & |
inner, |
|
|
const Ref< MPContext > & |
mpx, |
|
|
const Ref< ItemMask > & |
mask = NIL |
|
) |
| |
virtual jive::algebra::MPVectorSpace::~MPVectorSpace |
( |
| ) |
|
|
protectedvirtual |
virtual void jive::algebra::MPVectorSpace::readFrom |
( |
ObjectInput & |
in | ) |
|
|
virtual |
virtual void jive::algebra::MPVectorSpace::writeTo |
( |
ObjectOutput & |
out | ) |
const |
|
virtual |
virtual Ref<Object> jive::algebra::MPVectorSpace::clone |
( |
| ) |
const |
|
virtual |
virtual idx_t jive::algebra::MPVectorSpace::globalSize |
( |
| ) |
const |
|
virtual |
virtual bool jive::algebra::MPVectorSpace::isDistributed |
( |
| ) |
const |
|
virtual |
virtual double jive::algebra::MPVectorSpace::product |
( |
const Vector & |
x, |
|
|
const Vector & |
y |
|
) |
| const |
|
virtual |
Returns the scalar product (dot product) of the vectors x and y.
- Parameters
-
x | - a vector. |
y | - another vector. |
- Precondition
x.size() == this->size() &&
y.size() == this->size()
- Returns
- The scalar product of x and y.
Implements jive::algebra::VectorSpace.
virtual void jive::algebra::MPVectorSpace::products |
( |
const Vector & |
a, |
|
|
const Matrix & |
x, |
|
|
const Matrix & |
y |
|
) |
| const |
|
virtual |
Computes the scalar products of the columns of the matrices x and y. The products are stored in the vector a. To be precise, a
[i] is set to the scalar product of the i-th columns of the matrices x and y.
The implementation of this function provoded by the VectorSpace
class repeatedly calls the member function product()
. Derived classes are encouraged to provide a more efficient implementation.
- Parameters
-
a | - a vector that will be filled with the scalar products. |
x | - the first input matrix. |
y | - the second input matrix. |
- Precondition
a.size() == x.size(1) &&
x.size(0) == this->size() &&
y.size(0) == this->size() &&
y.size(1) == x.size(1)
Reimplemented from jive::algebra::VectorSpace.
virtual void jive::algebra::MPVectorSpace::project |
( |
const Vector & |
a, |
|
|
const Vector & |
x, |
|
|
const Matrix & |
y |
|
) |
| const |
|
virtual |
Fills the vector a with the scalar products of the vector x with the columns of the matrix y. That is, a
[i] is set to the scalar product of x with the i-th column of y. If the size of the vector a is larger than n
, with n
the number of columns in the matrix y, then a
[n] is set to the scalar product of the vector x with itself. This behavior is particularly handy when implementing algorithms that involve an orthogonalization procedure.
The implementation of this function provoded by the VectorSpace
class repeatedly calls the member function product()
. Derived classes are encouraged to provide a more efficient implementation.
- Parameters
-
a | - a vector that will be filled with the scalar products. |
x | - an input vector. |
y | - an input matrix. |
- Precondition
a.size() == y.size(1) &&
x.size() == this->size() &&
y.size(0) == this->size()
Reimplemented from jive::algebra::VectorSpace.
VectorSpace * jive::algebra::MPVectorSpace::getInner |
( |
| ) |
const |
ItemMask * jive::algebra::MPVectorSpace::getItemMask |
( |
| ) |
const |
virtual DofSpace* jive::algebra::MPVectorSpace::getDofSpace |
( |
| ) |
const |
|
virtual |