biu::LatticeModel Class Reference
#include <LatticeModel.hh>
Inheritance diagram for biu::LatticeModel:
Detailed Description
A lattice model handles the lattice type speficic calculations based on the specified biu::LatticeDescriptor object.This class is limited to an integer lattice point representation.
Definition at line 21 of file LatticeModel.hh.
Public Member Functions | |
virtual IPointVec | absMovesToPoints (const MoveSequence &absMoves) const |
MoveSequence | absMovesToRelMoves (const MoveSequence &absMoves) const |
virtual IntPoint | applyAbsMove (const IntPoint &actPoint, const Move &absMove) const |
virtual bool | areNeighbored (const IntPoint &first, const IntPoint &second) const |
virtual Move | getAbsMove (const IntPoint &lastPoint, const IntPoint &actPoint) const |
virtual IPointSet | getAllNeighPoints (const IntPoint ¢er) const |
LatticeDescriptor const *const | getDescriptor () const |
const LatticeNeighborhood & | getNeighborhood () const |
virtual std::string | getString (const MoveSequence &moveSeq) const |
LatticeModel (const LatticeModel &toCopy) | |
LatticeModel (const LatticeDescriptor *const _latDescriptor) | |
bool | operator!= (const LatticeModel &lm2) const |
bool | operator== (const LatticeModel &lm2) const |
virtual MoveSequence | parseMoveString (const std::string &moveStr) const |
virtual MoveSequence | pointsToAbsMoves (const IPointVec &points) const |
virtual MoveSequence | pointsToRelMoves (const IPointVec &points) const |
MoveSequence | relMovesToAbsMoves (const MoveSequence &relMoves) const |
virtual IPointVec & | relMovesToPoints (const MoveSequence &relMoves, IPointVec &toFill) const |
virtual IPointVec | relMovesToPoints (const MoveSequence &relMoves) const |
virtual | ~LatticeModel () |
Protected Attributes | |
LatticeDescriptor const *const | latDescriptor |
const LatticeNeighborhood & | latNeighborhood |
Constructor & Destructor Documentation
biu::LatticeModel::LatticeModel | ( | const LatticeDescriptor *const | _latDescriptor | ) |
construction
- Parameters:
-
_latDescriptor This lattice property handler has to be != NULL.
Definition at line 6 of file LatticeModel.cc.
biu::LatticeModel::LatticeModel | ( | const LatticeModel & | toCopy | ) |
Definition at line 14 of file LatticeModel.cc.
biu::LatticeModel::~LatticeModel | ( | ) | [virtual] |
Definition at line 23 of file LatticeModel.cc.
Member Function Documentation
IPointVec biu::LatticeModel::absMovesToPoints | ( | const MoveSequence & | absMoves | ) | const [virtual] |
MoveSequence biu::LatticeModel::absMovesToRelMoves | ( | const MoveSequence & | absMoves | ) | const |
Convert a sequence of absolute moves to a sequence of relative moves
Definition at line 54 of file LatticeModel.cc.
virtual bool biu::LatticeModel::areNeighbored | ( | const IntPoint & | first, | |
const IntPoint & | second | |||
) | const [virtual] |
Return whether or not two points in the lattice are neighbored, based on the current lattice descriptor.
- Parameters:
-
first the first point second the second point
- Returns:
- true if (second-first) is element of the neighborhood, false otherwise
virtual Move biu::LatticeModel::getAbsMove | ( | const IntPoint & | lastPoint, | |
const IntPoint & | actPoint | |||
) | const [virtual] |
Converts two points into an absolute move.
They have to be neighbored in the lattice.
Calculates all neighbored points to the given center based on the current lattice descriptor.
Definition at line 171 of file LatticeModel.cc.
LatticeDescriptor const* const biu::LatticeModel::getDescriptor | ( | ) | const [inline] |
Returns a constant reference to the current lattice descriptor.
Definition at line 40 of file LatticeModel.hh.
const LatticeNeighborhood& biu::LatticeModel::getNeighborhood | ( | ) | const [inline] |
virtual std::string biu::LatticeModel::getString | ( | const MoveSequence & | moveSeq | ) | const [virtual] |
Returns the string representation of the move sequence.
bool biu::LatticeModel::operator!= | ( | const LatticeModel & | lm2 | ) | const |
bool biu::LatticeModel::operator== | ( | const LatticeModel & | lm2 | ) | const |
virtual MoveSequence biu::LatticeModel::parseMoveString | ( | const std::string & | moveStr | ) | const [virtual] |
Converts an absolute/relative move string representation into an absolute/relative move sequence.
MoveSequence biu::LatticeModel::pointsToAbsMoves | ( | const IPointVec & | points | ) | const [virtual] |
Converts a vector of points to an absolute move string.
Consecutive positions have to be neighbored in the lattice!
Definition at line 158 of file LatticeModel.cc.
virtual MoveSequence biu::LatticeModel::pointsToRelMoves | ( | const IPointVec & | points | ) | const [virtual] |
Converts a vector of points to a relative move string.
Consecutive positions have to be neighbored in the lattice!
MoveSequence biu::LatticeModel::relMovesToAbsMoves | ( | const MoveSequence & | relMoves | ) | const |
Convert a sequence of relative moves to a sequence of absolute moves
Definition at line 32 of file LatticeModel.cc.
IPointVec & biu::LatticeModel::relMovesToPoints | ( | const MoveSequence & | relMoves, | |
IPointVec & | toFill | |||
) | const [virtual] |
Converts a relative move string to coordinates written to the given vector toFill.
Definition at line 132 of file LatticeModel.cc.
IPointVec biu::LatticeModel::relMovesToPoints | ( | const MoveSequence & | relMoves | ) | const [virtual] |
Field Documentation
LatticeDescriptor const* const biu::LatticeModel::latDescriptor [protected] |
The lattice property handler (!= NULL).
Definition at line 25 of file LatticeModel.hh.
const LatticeNeighborhood& biu::LatticeModel::latNeighborhood [protected] |
The documentation for this class was generated from the following files:
- src/biu/LatticeModel.hh
- src/biu/LatticeModel.cc