A lattice graph can similarly be constructed by taking a graph on a unit cell and copying it to all the cells in the lattice, which will be discussed later.
Here we will present the concepts related to lattices:
For more information see the documentation of the lattice XML schema on http://xml.comp-phys.org/.
For more information see the documentation of the lattice XML schema on http://xml.comp-phys.org/.
Accessing cell properties could be added similar to accessing vertex properties in the BGL.
C | a type that is a model of Cell |
lattice::cell_traits<C>::offset_type
a type modelling the concept Vector with usually integral value_type. It can store the number of translations along each of the basis vectors needed to reach a cell from the unit cell at the origin. |
For a reference implementation of a cell see simplecell.h.namespace alps { template <class C> struct cell_traits { typedef typename C::offset_type offset_type; }; }
L | a type that is a model of Lattice |
C | the type lattice::lattice_traits<L>::cell_descriptor a type that is a model of Cell |
l | an object of type L |
c | an object of type lattice::lattice_traits<L>::cell_descriptor |
o | an object of type lattice::cell_traits<C>::offset_type |
lattice::lattice_traits<L>::unit_cell_type a model of UnitCell |
lattice::lattice_traits<L>::cell_descriptor a model of Cell |
lattice::lattice_traits<L>::offset_type same as lattice::cell_traits<typename lattice::lattice_traits<L>::cell_descriptor>::offset_type a type modelling the concept Vector with usually integral value_type. It can store the number of translations along the basis vectors needed to reach a cell from the unit cell at the origin. |
lattice::unit_cell(l) | return type lattice::lattice_traits<L>::unit_cell_type the unit cell of the lattice. |
lattice::cell(o,l) | return type lattice::lattice_traits<L>::cell_descriptor the cell arrived at by translating the unit cell along o times the basis vectors. |
lattice::offset(c,l) | return type lattice_traits<L>::cell_descriptor returns the offset by which the unit cell must be translated to arrive at cell c Invariant: lattice::offset(lattice::cell(o,l),l) == o |
For a reference implementation of a simple lattice see simplelattice.h.
L | a type that is a model of CoordinateLattice |
l | an object of type L |
c | an object of type lattice::lattice_traits<L>::cell_descriptor |
lattice::lattice_traits<L>::vector_type a type modelling the concept CoordinateVector. It can store a basis vector of the lattice. |
lattice::lattice_traits<L>::basis_vector_iterator a const iterator type to iterate through the basis vectors the value_type of the iterator is const lattice::coordinatelattice_traits<L>::vector_type |
lattice::basis_vectors(l) | return type is std::pair< typename lattice::lattice_traits<L>::basis_vector_iterator, typename lattice::lattice_traits<L>::basis_vector_iterator> the first entry points to the first basis vector, the second entry one past the last basis vector. |
lattice::origin(c,l) | return type lattice::lattice_traits<L>::vector_type the coordinates of the cell. This can be calculated by adding up the basis vectors multiplied by the corresponding entry in the cell offset |
For a reference implementation see coordinatelattice.h.
For more information see the documentation of the lattice XML schema on http://xml.comp-phys.org/.
L | a type that is a model of FiniteLattice |
C | the type lattice::lattice_traits<L>::cell_descriptor a type that is a model of Cell |
l | an object of type L |
c | an object of type lattice::lattice_traits<L>::cell_descriptor |
o, s | objects of type lattice::cell_traits<C>::offset_type |
i | an object of type lattice::lattice_traits<C>::size_type |
lattice::lattice_traits<L>::cell_iterator the type of iterators over cells in the FiniteLattice |
lattice::lattice_traits<L>::size_type an integral type large enough to represent the number of cells in the lattice |
lattice::lattice_traits<L>::boundary_crossing_type a property type to describe whether shifting a cellmoved it across a boundary of a periodic lattice. |
lattice::volume(l) | return type lattice::lattice_traits<L>::size_type the number of cells in the lattice. |
lattice::on_lattice(o,l) | return type bool specifies whether the cell with given offset is on the (finite) lattice. |
lattice::cell(o,l) | same as for Lattice, except that result is unspecified if lattice::on_lattice(l,o)==false and the cell is not on the lattice |
lattice::shift(o,s,l) | return type std::pair<bool,lattice::lattice_traits<L>::boundary_crossing_type> >. shifts the offset o by the vector s, taking into account boundary conditions of the lattice. If the shifted offset is on the lattice the first part of the value is true and o contains the shifted offset. Otherwise the return value is false and the value of o undefined. On an infinite lattice this would be equivalent to o = o + s. The second argument specifies which boundaries of a periodic lattice were crossed in which directions, if the resulting cell was actually on the lattice. |
lattice::index(c,l) | return type lattice::lattice_traits<L>::size_type the index of the cell, 0 <= lattice::index(l,c) < lattice::volume(l) |
lattice::cells(l) | return type std::pair<typename lattice::lattice_traits<L>::cell_iterator,
typename lattice::lattice_traits<L>::cell_iterator> returns a pair of iterators over all the cells in the lattice, the first iterator points to the first cell in the lattice, the second iterator one past the last cell. |
For a reference implementation of a hypercubic lattice see hypercubic.h.
copyright (c) 1994-2010 by Matthias Troyer
Distributed under the Boost Software License, Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt)