namespace alps { template <class UnitCell=EmptyUnitCell, class Cell = simple_cell<UnitCell> > class simple_lattice { public: typedef UnitCell unit_cell_type; typedef Cell cell_descriptor; typedef typename lattice::dimensional_traits<unit_cell_type>::dimension_type dimension_type; typedef typename cell_traits< cell_descriptor>::offset_type offset_type; simple_lattice(); template<class U2, class C2> simple_lattice(const simple_lattice<U2,C2>& l); simple_lattice(const unit_cell_type& c); unit_cell_type& unit_cell(); const unit_cell_type& unit_cell() const; cell_descriptor cell(offset_type o) const; dimension_type dimension() const; }; template <class UnitCell, class Cell> struct lattice_traits<simple_lattice<UnitCell,Cell> > { typedef typename simple_lattice<UnitCell,Cell>::unit_cell_type unit_cell_type; typedef typename simple_lattice<UnitCell,Cell>::cell_descriptor cell_descriptor; typedef typename simple_lattice<UnitCell,Cell>::offset_type offset_type; }; }
typedefs for the template parameters.typedef UnitCell unit_cell_type; typedef Cell cell_descriptor;
the type for the dimension of the lattice.typedef typename lattice::dimensional_traits<unit_cell_type>::dimension_type dimension_type;
the offset type of the cell.typedef typename cell_traits< cell_descriptor>::offset_type offset_type;
the default constructor.simple_lattice();
the copy constructors.template<class U2, class C2> simple_lattice(const simple_lattice<U2,C2>& l);
constracts from a unitcell.simple_lattice(const unit_cell_type& c);
return the unit cell.unit_cell_type& unit_cell(); const unit_cell_type& unit_cell() const;
returns a cell with a given offsetcell_descriptor cell(offset_type o) const;
returns the dimension of the lattice.dimension_type dimension();
is the traits class for the lattice.template <class UnitCell, class Cell> struct lattice_traits<simple_lattice<UnitCell,Cell> > { typedef typename simple_lattice<UnitCell,Cell>::unit_cell_type unit_cell_type; typedef typename simple_lattice<UnitCell,Cell>::cell_descriptor cell_descriptor; typedef typename simple_lattice<UnitCell,Cell>::offset_type offset_type; };
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)