Adaptagrams
Public Member Functions | Public Attributes | List of all members
vpsc::Constraint Class Reference

A constraint determines a minimum or exact spacing required between two Variable objects. More...

#include <constraint.h>

Collaboration diagram for vpsc::Constraint:
Collaboration graph

Public Member Functions

 Constraint (Variable *left, Variable *right, double gap, bool equality=false)
 Constructs a minimum or exact spacing constraint between two Variable objects. More...
 
std::string toString (void) const
 Returns a textual description of the constraint. More...
 

Public Attributes

Variableleft
 The left Variable.
 
Variableright
 The right Variable.
 
double gap
 The minimum or exact distance to separate the variables by.
 
const bool equality
 Whether the separation is an exact distance or not.
 
bool unsatisfiable
 Denote whether this constraint was unsatisifable (once the VPSC instance has been solved or satisfied).
 

Detailed Description

A constraint determines a minimum or exact spacing required between two Variable objects.

Constructor & Destructor Documentation

◆ Constraint()

vpsc::Constraint::Constraint ( Variable left,
Variable right,
double  gap,
bool  equality = false 
)

Constructs a minimum or exact spacing constraint between two Variable objects.

(left + gap < right) or (left + gap == right)

Parameters
[in]leftThe left Variable.
[in]rightThe right Variable.
[in]gapThe minimum or exact distance to separate the variables by.
[in]equalityWhether the separation is an exact distance or not. The default is false.

Member Function Documentation

◆ toString()

std::string vpsc::Constraint::toString ( void  ) const
inline

Returns a textual description of the constraint.

Returns
A string describing the constraint.

References equality, gap, left, and right.


The documentation for this class was generated from the following files: