Jive reference manual
|
Bundles a solver and a constraints handler into a single object. More...
Public Member Functions | |
ConstrainedSolver (const jem::Ref< Solver > &solver, const jem::Ref< Constrainer > &constrainer) | |
Constructs a constrained solver given another solver and a constraints handler. More... | |
virtual void | solve (const Vector &lhs, const Vector &rhs) |
Computes the solution of a linear system of equations subjected to a set of linear constraints. More... | |
Public Member Functions inherited from jive::solver::Solver | |
virtual void | configure (const Properties &conf, const Properties &props) |
Configures this solver given a set of properties. More... | |
virtual jem::Class * | getClass () const |
Returns the Class instance representing the runtime class of this object. More... | |
Public Member Functions inherited from jem::Object | |
virtual String | toString () const |
Returns a short textual description of this object. More... | |
virtual long | hashValue () const |
Returns a hash value for this object. More... | |
virtual bool | equals (const Ref< Object > &obj) const |
Tests whether two objects are equal. More... | |
Ref< Object > | clone () const |
Returns a copy of this object. More... | |
Protected Member Functions | |
virtual | ~ConstrainedSolver () |
Protected Member Functions inherited from jive::solver::Solver | |
virtual | ~Solver () |
Protected Member Functions inherited from jem::Collectable | |
Collectable () | |
Creates an empty Collectable . More... | |
~Collectable () | |
Frees resources. More... | |
Additional Inherited Members | |
Public Types inherited from jive::solver::Solver | |
typedef jem::util::Properties | Properties |
A type representing a set of properties. More... | |
typedef util::Vector | Vector |
A type that represents a vector. More... | |
Static Public Member Functions inherited from jive::solver::Solver | |
static jem::Class * | getType () |
Static Public Member Functions inherited from jem::Object | |
static Class * | getType () |
Returns the Class instance representing the Object class. More... | |
#include <jive/solver/ConstrainedSolver.h>
A ConstrainedSolver
object bundles a Solver
object and a Constrainer
object. When the member function solve()
is invoked on a ConstrainedSolver
object, it will automatically apply the constraints encapsulated by its Constrainer
object.
jive::solver::ConstrainedSolver::ConstrainedSolver | ( | const jem::Ref< Solver > & | solver, |
const jem::Ref< Constrainer > & | constrainer | ||
) |
Constructs a new ConstrainedSolver
that encapsulates the Solver
object solver and the Constrainer
object constrainer. It is your responsibility to make sure that the solver object solver has a reference to the constrained coefficient matrix constrainer->getOutputMatrix()
.
solver | - a Solver object. |
constrainer | - a Constrainer object. |
solver != NIL &&
constrainer != NIL
|
protectedvirtual |
|
virtual |
Computes the solution of a linear system of equations subjected to a set of linear constraints. If solver
and constrainer
denote the solver and constraints handler, respectively, that were passed to the constructor, then this function executes the following code:
Note that the function apply
may update the shape of the output matrix. It is therefore called before the solution vector and right-hand side vector are created.
Implements jive::solver::Solver.