Jive reference manual: jive::solver::Constrainer Class Reference

The abstract class Constrainer can be used to apply a set of constraints to a linear system of equations. It extends the algebra::MatrixTransformer class with functions for computing the right-hand side vector for the constrained system of equations, and for transforming the solution of the constrained system to the original system. A Constrainer has in input matrix and an output matrix of type algebra::AbstractMatrix. The input matrix represents the coefficient matrix of the original, unconstrained system of equations, while the output matrix represents the coefficient matrix of the constrained system of equations. The input and output matrices do not necessarily have to be square, a subclass of the Constrainer class may provide support for non-square matrices. All current Constrainer subclasses in Jive, however, only support square matrices. The Constrainer class is typically used together with the Solver class to compute the solution of a linear system of equations that is subjected to a set of constraints. The Vector type represents a one-dimensional array containing double precision numbers. It is just an alias for jive::util::Vector. Updates the output matrix and the internal state of this Constrainer object using the current set of constraints. A reference to the output matrix can be obtained by calling the member function getOutputMatrix(). The function apply() should be called whenever the constraints and/or the input matrix have been modified. This function should do nothing if the constraints and the input matrix have not been modified since the last time that this function was called. Computes a right-hand side vector for the constrained system of equations given a right-hand side vector for the original system of equations. The output parameter g will be set to the constrained right-hand side vector. The input parameter f should contain the original right-hand side vector. Before calling this function you must have called the function apply(), unless the coefficient matrix of the original system of equations and the constraints have not been modified. Implemented in jive::solver::GenericConstrainer, jive::solver::PointConstrainer, jive::solver::StdConstrainer, and jive::solver::DummyConstrainer. Transforms a solution of the constrained system of equations into a solution of the original system of equations. The output parameter x will be set to the solution of the original system. The input parameter y should contain the solution of the constrained system of equations. Returns the shape of the input matrix at the last time that the function apply() was called. The returned shape may be different from because the input matrix may have been modified since apply() was called. This is the case, for instance, if this constraints handler modifies the input matrix in place (that is, if the input and output matrices point to the same object). You can use this function to determine the size of the solution vector and the right-hand side vector for the original system of equations. You can use this function to determine the size of the solution vector and the right-hand side vector for the constrained system of equations. Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 18, 2016 @ 2:11 am