|
TVM
0.9.4
|
#include <tvm/scheme/internal/Assignment.h>
Public Types | |
| using | RHSFunction = const Eigen::VectorXd &(constraint::abstract::LinearConstraint::*)() const |
| using | MatrixFunction = MatrixRef(AssignmentTarget::*)(int, int) const |
| using | VectorFunction = VectorRef(AssignmentTarget::*)() const |
Public Member Functions | |
| Assignment (LinearConstraintPtr source, SolvingRequirementsPtr req, const AssignmentTarget &target, const VariableVector &variables, const hint::internal::Substitutions *const subs=nullptr, double scalarizationWeight=1) | |
| Assignment (LinearConstraintPtr source, const AssignmentTarget &target, const VariablePtr &variables, bool first) | |
| Assignment (const Assignment &)=delete | |
| Assignment (Assignment &&)=default | |
| Assignment & | operator= (const Assignment &)=delete |
| Assignment & | operator= (Assignment &&)=default |
| AssignmentTarget & | target (IWontForgetToCallUpdates={}) |
| bool | changeScalarWeightIsAllowed () |
| bool | changeVectorWeightIsAllowed () |
| void | onUpdatedSource () |
| void | onUpdatedTarget () |
| void | onUpdatedMapping (const VariableVector &newVar, bool updateMatrixtarget=true) |
| void | onUpdateWeights (bool scalar=true, bool vector=true) |
| void | run () |
Static Public Member Functions | |
| static Assignment | reprocess (const Assignment &, const VariableVector &, const hint::internal::Substitutions *const) |
| static Assignment | reprocess (const Assignment &, const VariablePtr &, bool) |
Static Public Attributes | |
| static double | big_ |
A class whose role is to assign efficiently the matrix and vector(s) of a LinearConstraint to a part of matrix and vector(s) specified by a ResolutionScheme and a mapping of variables. This is done while taking into account the possible convention differences between the constraint and the scheme, as well as the requirements on the constraint.
| using tvm::scheme::internal::Assignment::MatrixFunction = MatrixRef (AssignmentTarget::*)(int, int) const |
Pointer type to a method of AssignmentTarget returning a matrix block. It is used to make a selection between A(), AFirstHalf() and ASecondHalf().
| using tvm::scheme::internal::Assignment::RHSFunction = const Eigen::VectorXd & (constraint::abstract::LinearConstraint::*)() const |
Pointer type to a method of LinearConstraint returning a vector. It is used to make a selection between e(), l() and u().
| using tvm::scheme::internal::Assignment::VectorFunction = VectorRef (AssignmentTarget::*)() const |
Pointer type to a method of AssignementTarget returning a vector segment. It is used to make a selection between b(), bFirstHalf(), bSecondHalf(), l() and u().
| tvm::scheme::internal::Assignment::Assignment | ( | LinearConstraintPtr | source, |
| SolvingRequirementsPtr | req, | ||
| const AssignmentTarget & | target, | ||
| const VariableVector & | variables, | ||
| const hint::internal::Substitutions *const | subs = nullptr, |
||
| double | scalarizationWeight = 1 |
||
| ) |
Assignment constructor
| source | The linear constraints whose matrix and vector(s) will be assigned. |
| req | Solving requirements attached to this constraint. |
| target | The target of the assignment. |
| variables | The vector of variables corresponding to the target. It must be such that its total dimension is equal to the column size of the target matrix. |
| scalarizationWeight | An additional scalar weight to apply on the constraint, used by the solver to emulate priority. |
| tvm::scheme::internal::Assignment::Assignment | ( | LinearConstraintPtr | source, |
| const AssignmentTarget & | target, | ||
| const VariablePtr & | variables, | ||
| bool | first | ||
| ) |
Version for bounds
| first | whether this is the first assignment of bounds for this variable (first assignment just copy vectors while the following ones need to perform min/max operations). |
|
delete |
|
default |
| bool tvm::scheme::internal::Assignment::changeScalarWeightIsAllowed | ( | ) |
Change the weight.
| bool tvm::scheme::internal::Assignment::changeVectorWeightIsAllowed | ( | ) |
| void tvm::scheme::internal::Assignment::onUpdatedMapping | ( | const VariableVector & | newVar, |
| bool | updateMatrixtarget = true |
||
| ) |
To be called when the variables change.
| void tvm::scheme::internal::Assignment::onUpdatedSource | ( | ) |
To be called when the source has been resized
| void tvm::scheme::internal::Assignment::onUpdatedTarget | ( | ) |
To be called when the target has been resized and/or range has changed
| void tvm::scheme::internal::Assignment::onUpdateWeights | ( | bool | scalar = true, |
| bool | vector = true |
||
| ) |
To be called after changing the weights.
|
default |
|
delete |
|
static |
|
static |
| void tvm::scheme::internal::Assignment::run | ( | ) |
Perform the assignment.
| AssignmentTarget& tvm::scheme::internal::Assignment::target | ( | IWontForgetToCallUpdates | = {} | ) |
|
static |