Adaptagrams
|
An abstract base class for all high-level compound constraints. More...
#include <compound_constraints.h>
Public Member Functions | |
virtual void | generateVariables (const vpsc::Dim dim, vpsc::Variables &vars)=0 |
Implemented by the compound constraint to generate any additional required variables in the given dimension. More... | |
virtual void | generateSeparationConstraints (const vpsc::Dim dim, vpsc::Variables &var, vpsc::Constraints &cs, vpsc::Rectangles &bbs)=0 |
Implemented by the compound constraint to generate the low-level separation constraints in the given dimension. More... | |
virtual void | updatePosition (const vpsc::Dim dim) |
Implemented by the compound constraint to send position information back to the interface. More... | |
virtual std::string | toString (void) const =0 |
Returns a textual description of the compound constraint. More... | |
An abstract base class for all high-level compound constraints.
A compound constraint is a conceptual, diagramming application oriented type of constraint, which can be translated into a set of simple separation constraints, possibly extra dummy variables, and perhaps even some extra terms for the quadratic objective function used in the gradient projection solver.
|
pure virtual |
Implemented by the compound constraint to generate the low-level separation constraints in the given dimension.
These constraints will be added to the list of constraints cs.
[in] | dim | The current active dimension. |
[in] | vars | The list of variables for the overall problem instance. |
[in,out] | cs | The list of constraints to which the generated constraints will be added. |
[in] | bbs | The list of bounding boxes for all rectangles in the current problem. It has the same order as vars. |
Implemented in cola::PageBoundaryConstraints, cola::FixedRelativeConstraint, cola::DistributionConstraint, cola::MultiSeparationConstraint, cola::SeparationConstraint, cola::AlignmentConstraint, and cola::BoundaryConstraint.
|
pure virtual |
Implemented by the compound constraint to generate any additional required variables in the given dimension.
Generate any additional variables required by this compound constraint when operating in the given dimension dim and add them to vars. These variables should be cleaned up by the caller after the VPSC problem is solved.
The variables' ideal position and weight should be set by the compound constraint and they should be added to the end of vars.
[in] | dim | The current active dimension. |
[in,out] | vars | The list of variables for the overall problem instance to which any variables generated should be appended. |
Implemented in cola::PageBoundaryConstraints, cola::FixedRelativeConstraint, cola::DistributionConstraint, cola::MultiSeparationConstraint, cola::SeparationConstraint, cola::AlignmentConstraint, and cola::BoundaryConstraint.
|
pure virtual |
Returns a textual description of the compound constraint.
Implemented in cola::PageBoundaryConstraints, cola::FixedRelativeConstraint, cola::DistributionConstraint, cola::MultiSeparationConstraint, cola::SeparationConstraint, cola::AlignmentConstraint, and cola::BoundaryConstraint.
|
inlinevirtual |
Implemented by the compound constraint to send position information back to the interface.
This will be called for each compound constraint once the VPSC instance is solved to allow them to pass information such as variable values back to the graphical user interface.
[in] | dim | The current active dimension. |
Reimplemented in cola::PageBoundaryConstraints, cola::AlignmentConstraint, and cola::BoundaryConstraint.