biu::LatticeDescriptor Class Reference
#include <LatticeDescriptor.hh>
Inheritance diagram for biu::LatticeDescriptor:
Detailed Description
An LatticeDescriptor object handles the lattice specific data to construct an integer point based lattice. It controls all available automorphisms, the lattice base vectors and the neighborhood vectors that are available for the managed lattice.
Definition at line 28 of file LatticeDescriptor.hh.
Public Member Functions | |
virtual bool | areNeighbored (const IntPoint &first, const IntPoint &second) const |
const Alphabet *const | getAlphabet () const |
virtual const AutomorphismVec & | getAutomorphisms () const |
virtual const IPointVec & | getBase () const |
virtual std::string | getName () const |
virtual const LatticeNeighborhood & | getNeighborhood () const |
virtual MoveSequence | getSequence (const std::string &moveString) const |
virtual std::string | getString (const MoveSequence &moveSeq) const |
LatticeDescriptor (const LatticeDescriptor &toCopy) | |
LatticeDescriptor (const std::string &name_) | |
virtual MoveSequence | normalizeSequence (const MoveSequence &moveSeq) const |
bool | operator!= (const LatticeDescriptor &ld2) const |
virtual LatticeDescriptor & | operator= (const LatticeDescriptor &ld2) |
bool | operator== (const LatticeDescriptor &ld2) const |
virtual | ~LatticeDescriptor () |
Protected Member Functions | |
virtual const AutomorphismData * | getAutomorphismData () const=0 |
virtual unsigned int | getAutomorphismDataSize () const=0 |
virtual const NeighborData * | getNeighborData () const=0 |
virtual unsigned int | getNeighborDataSize () const=0 |
void | initAutomorphisms () |
void | initNeighborhood () |
Protected Attributes | |
AutomorphismVec | automorphisms |
IPointVec | latBase |
LatticeNeighborhood * | latNeighborhood |
MoveAlphabet * | moveAlphabet |
std::vector< MoveSequence > | symMoveReplacement |
Private Attributes | |
std::string | name |
Data Structures | |
struct | AutomorphismData |
struct | NeighborData |
Constructor & Destructor Documentation
biu::LatticeDescriptor::LatticeDescriptor | ( | const std::string & | name_ | ) |
Definition at line 22 of file LatticeDescriptor.cc.
biu::LatticeDescriptor::LatticeDescriptor | ( | const LatticeDescriptor & | toCopy | ) |
Definition at line 27 of file LatticeDescriptor.cc.
biu::LatticeDescriptor::~LatticeDescriptor | ( | ) | [virtual] |
Definition at line 53 of file LatticeDescriptor.cc.
Member Function Documentation
virtual bool biu::LatticeDescriptor::areNeighbored | ( | const IntPoint & | first, | |
const IntPoint & | second | |||
) | const [virtual] |
Returns whether or not two points in the lattice are neighbored.
- Parameters:
-
first the first point second the second point
- Returns:
- true if (second-first) is element of the neighborhood, false otherwise
Reimplemented in biu::LatticeDescriptorCUB, biu::LatticeDescriptorFCC, and biu::LatticeDescriptorSQR.
const Alphabet* const biu::LatticeDescriptor::getAlphabet | ( | ) | const [inline] |
Returns the move alphabet of this lattice descriptor.
Definition at line 107 of file LatticeDescriptor.hh.
virtual const AutomorphismData* biu::LatticeDescriptor::getAutomorphismData | ( | ) | const [protected, pure virtual] |
Gets pointer to automorphism data array.
Implemented in biu::LatticeDescriptorCUB, biu::LatticeDescriptorFCC, and biu::LatticeDescriptorSQR.
virtual unsigned int biu::LatticeDescriptor::getAutomorphismDataSize | ( | ) | const [protected, pure virtual] |
get number of automorphisms
Implemented in biu::LatticeDescriptorCUB, biu::LatticeDescriptorFCC, and biu::LatticeDescriptorSQR.
virtual const AutomorphismVec& biu::LatticeDescriptor::getAutomorphisms | ( | ) | const [virtual] |
Returns a vector of all automorphisms in this lattice.
virtual const IPointVec& biu::LatticeDescriptor::getBase | ( | ) | const [virtual] |
Returns the lattice base vectors.
virtual std::string biu::LatticeDescriptor::getName | ( | ) | const [virtual] |
virtual const NeighborData* biu::LatticeDescriptor::getNeighborData | ( | ) | const [protected, pure virtual] |
Gets pointer to neighbor data array. Together with getNeighborDataSize this defines the lattice in derived classes in a way that can be used by initNeighborhood for initializing the lattice neighborhood and move alphabet.
Implemented in biu::LatticeDescriptorCUB, biu::LatticeDescriptorFCC, and biu::LatticeDescriptorSQR.
virtual unsigned int biu::LatticeDescriptor::getNeighborDataSize | ( | ) | const [protected, pure virtual] |
get number of neighbors
Implemented in biu::LatticeDescriptorCUB, biu::LatticeDescriptorFCC, and biu::LatticeDescriptorSQR.
virtual const LatticeNeighborhood& biu::LatticeDescriptor::getNeighborhood | ( | ) | const [virtual] |
virtual MoveSequence biu::LatticeDescriptor::getSequence | ( | const std::string & | moveString | ) | const [virtual] |
Converts a move string into the internal move string sequence representation.
- Parameters:
-
moveString Has to be a valid move string.
virtual std::string biu::LatticeDescriptor::getString | ( | const MoveSequence & | moveSeq | ) | const [virtual] |
Converts an internal move string sequence representation into a string representation.
Returns an empty string in error case.
void biu::LatticeDescriptor::initAutomorphisms | ( | ) | [protected] |
inits the automorphisms using getAutomorphismData*
Definition at line 127 of file LatticeDescriptor.cc.
void biu::LatticeDescriptor::initNeighborhood | ( | ) | [protected] |
inits the neighborhood from the data of getNeighborData() and getNeighborDataSize(). Generic function that should be called in the constructors of derived classes
Definition at line 89 of file LatticeDescriptor.cc.
MoveSequence biu::LatticeDescriptor::normalizeSequence | ( | const MoveSequence & | moveSeq | ) | const [virtual] |
Converts an internal move string sequence representation into a normalized form, that is the same for all symmetric structures.
- Parameters:
-
moveSeq the move string representation to normalize
- Returns:
- the normalized move string representation
Definition at line 173 of file LatticeDescriptor.cc.
bool biu::LatticeDescriptor::operator!= | ( | const LatticeDescriptor & | ld2 | ) | const |
Definition at line 76 of file LatticeDescriptor.cc.
LatticeDescriptor & biu::LatticeDescriptor::operator= | ( | const LatticeDescriptor & | ld2 | ) | [virtual] |
Definition at line 37 of file LatticeDescriptor.cc.
bool biu::LatticeDescriptor::operator== | ( | const LatticeDescriptor & | ld2 | ) | const |
Definition at line 65 of file LatticeDescriptor.cc.
Field Documentation
AutomorphismVec biu::LatticeDescriptor::automorphisms [protected] |
all available automorphisms in this lattice e.g. rotations
Definition at line 36 of file LatticeDescriptor.hh.
IPointVec biu::LatticeDescriptor::latBase [protected] |
the base vectors of the lattice
Definition at line 39 of file LatticeDescriptor.hh.
The neighbor vectors that define the neighborhood in the lattice.
The first NeighborVector in the set represents the default direction for relative move string calculation.
Definition at line 49 of file LatticeDescriptor.hh.
MoveAlphabet* biu::LatticeDescriptor::moveAlphabet [protected] |
the move string alphabet
Definition at line 41 of file LatticeDescriptor.hh.
std::string biu::LatticeDescriptor::name [private] |
the name of the lattice model
Definition at line 32 of file LatticeDescriptor.hh.
std::vector<MoveSequence> biu::LatticeDescriptor::symMoveReplacement [protected] |
A shuffle information that can be used to normalize move sequences by replacing moves with symmetric ones according to a symmetry. It is initializes by initAutomorphisms()
Definition at line 55 of file LatticeDescriptor.hh.
The documentation for this class was generated from the following files:
- src/biu/LatticeDescriptor.hh
- src/biu/LatticeDescriptor.cc