
P is a type that models the Physical Pattern concept. pattern is an object of type P.
In addition to the types defined in the Pattern concept, the following types are introduced.
| Name | Expression | Description |
|---|---|---|
| Coordinate type | P::Coordinate | A type for representing the coordinates of each cell. |
| Direction change type | P::DirectionChange | A type for representing the change in course or bearing that occurs when traversing two consecutive edges in the underlying graph. |
In addition, the requirements for the cell and indexability types are strengthened: the cell type must model the Physical Cell concept, and the indexability type must be equivalent to boost::mpl::false_.
In addition to the expressions defined in the Pattern concept, the following expressions must be valid.
| Name | Expression | Type Requirements | Return Type |
|---|---|---|---|
| Yaw turn | p.getYawTurn(source_index, parent_index, target_index) | All three arguments must be convertible to P::CellIndex. | P::DirectionChange |
After initialization, the following semantics must apply.
| Name | Expression | Precondition | Semantics | Postcondition |
|---|---|---|---|---|
| Yaw turn | pattern.getYawTurn(source_index, parent_index, target_index) |
| Returns the change in course or bearing that occurs when traversing the corresponding edges in the underlying graph. |
In addition to the invariants and guarantees defined in the Pattern concept, the following invariants must hold.
| Name | Invariants | Runtime complexity |
|---|---|---|
| Entrance and source cell connection | The entrance cell will be connected to the closest indexable cell in the tesselation; this cell will be the source cell. | |
| Exit and target cell connection | The exit cell will be connected to the closest indexable cell in the tesselation; this cell will be the target cell. | |
| Yaw turn | Valid after initialization. | Amortized constant time |
Concrete classes deriving from PhysicalPattern:
Multi-State Mazes in C++ is hosted by . Use the Table of Contents for navigation.