Adaptagrams
Public Member Functions | List of all members
cola::VariableIDMap Class Reference

Holds a mapping between two sets of Variable indices. More...

#include <compound_constraints.h>

Collaboration diagram for cola::VariableIDMap:
Collaboration graph

Public Member Functions

bool addMappingForVariable (const unsigned from, const unsigned to)
 Adds a mapping between a pair of variables. More...
 

Detailed Description

Holds a mapping between two sets of Variable indices.

This can be used to rewrite the Rectangles to which a set of CompoundConstraints apply to. This is useful when creating another instance of the problem, but using the same CompoundConstraints list. You should not usually need to use this yourself. It is utilised by addons such as topology::AvoidTopologyAddon.

If a mapping for a particular value is not set, it is considered to be equal on both sides of the mapping.

Member Function Documentation

◆ addMappingForVariable()

bool cola::VariableIDMap::addMappingForVariable ( const unsigned  from,
const unsigned  to 
)

Adds a mapping between a pair of variables.

Parameters
[in]fromThe variable index to map from.
[in]toThe variable index to map to.
Returns
True if the mapping was successfully added.

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