namespace alps {
class LatticeGraphDescriptor
: public hypercubic_lattice<coordinate_lattice<simple_lattice<GraphUnitCell>,std::vector<alps::StringValue> >, std::vector< alps::StringValue> >
{
public:
typedef hypercubic_lattice<coordinate_lattice<simple_lattice<GraphUnitCell>,std::vector<alps::StringValue> >, std::vector< alps::StringValue> > base_type;
typedef lattice_traits<base_type>::unit_cell_type unit_cell_type;
typedef lattice_traits<base_type>::offset_type offset_type;
typedef lattice_traits<base_type>::cell_descriptor cell_descriptor;
typedef lattice_traits<base_type>::vector_type vector_type;
typedef lattice_traits<base_type>::basis_vector_iterator basis_vector_iterator;
typedef lattice_traits<base_type>::cell_iterator cell_iterator;
typedef lattice_traits<base_type>::size_type size_type;
typedef lattice_traits<base_type>::boundary_crossing_type boundary_crossing_type;
LatticeGraphDescriptor() {}
LatticeGraphDescriptor(const palmxml::XMLTag&, std::istream&,
const LatticeMap& = LatticeMap(),
const FiniteLatticeMap& = FiniteLatticeMap(),
const UnitCellMap& = UnitCellMap());
void set_parameters(const palm::Parameters&);
void write_xml(std::ostream&, const std::string& new_name= "");
const std::string& name() const;
const InhomogeneityDescriptor& disorder() const;
};
std::ostream& operator<< (std::ostream& out, const LatticeGraphDescriptor& l);
struct lattice_traits<LatticeGraphDescriptor>
{
typedef LatticeGraphDescriptor::unit_cell_type unit_cell_type;
typedef LatticeGraphDescriptor::cell_descriptor cell_descriptor;
typedef LatticeGraphDescriptor::offset_type offset_type;
typedef LatticeGraphDescriptor::basis_vector_iterator basis_vector_iterator;
typedef LatticeGraphDescriptor::cell_iterator cell_iterator;
typedef LatticeGraphDescriptor::size_type size_type;
typedef LatticeGraphDescriptor::vector_type vector_type;
typedef LatticeGraphDescriptor::boundary_crossing_type boundary_crossing_type;
};
typedef lattice_graph<LatticeGraphDescriptor,coordinate_graph_type> HypercubicLatticeGraph;
}
these types are inherited from hypercubic_lattice.typedef lattice_traits<base_type>::unit_cell_type unit_cell_type;
typedef lattice_traits<base_type>::offset_type offset_type;
typedef lattice_traits<base_type>::cell_descriptor cell_descriptor;
typedef lattice_traits<base_type>::vector_type vector_type;
typedef lattice_traits<base_type>::basis_vector_iterator basis_vector_iterator;
typedef lattice_traits<base_type>::cell_iterator cell_iterator;
typedef lattice_traits<base_type>::size_type size_type;
typedef lattice_traits<base_type>::boundary_crossing_type boundary_crossing_type;
an empty lattice without any information.LatticeGraphDescriptor() {}
reads the LatticeGraphDescriptor in XML from a stream assuming the Lattice XML schema on http://xml.comp-phys.org. The start tag <LATTICEGRAPH ...> has already been read and is passed as a palmxml::XMLTagLatticeGraphDescriptor(const palmxml::XMLTag&, std::istream&,
const LatticeMap& = LatticeMap(),
const FiniteLatticeMap& = FiniteLatticeMap(),
const UnitCellMap& = UnitCellMap());
In the lattice schema the < LATTICEGRAPH ...> contain <LATTICE ...>, <FINITELATTICE ...> and <UNITCELL ...> elements. These can either describe the lattice or unit cell fully, or refer to a lattice resp. unit cell by name. The optional LatticeMap, FiniteLatticeMap and UnitCellMaps argument can be used to pass the known lattices and unit cells.
The lattice schema allows the extent and boundary conditions to be specified by external parameters. The set_parameters function allows to pass a map of parameters, to fill the values of the parameters.void set_parameters(const palm::Parameters&);
writes the finite lattice in XML, using the same Lattice XML schema on http://xml.comp-phys.org. It can optionally be renamed by passing a new name as the second argument.void write_xml(std::ostream&, const std::string& new_name= "") const;
returns the name of the lattice.const std::string& name() const;
returns the InhomogeneityDescriptor, describing any disorder applied to the lattice.const InhomogeneityDescriptor& disorder() const;
writes the LatticeGraphDescriptor in XML, using the write_xml member function.std::ostream& operator<< (std::ostream& out, const LatticeGraphDescriptor& l);
define the lattice traits.struct lattice_traits<LatticeGraphDescriptor>
{
typedef LatticeGraphDescriptor::unit_cell_type unit_cell_type;
typedef LatticeGraphDescriptor::cell_descriptor cell_descriptor;
typedef LatticeGraphDescriptor::offset_type offset_type;
typedef LatticeGraphDescriptor::basis_vector_iterator basis_vector_iterator;
typedef LatticeGraphDescriptor::cell_iterator cell_iterator;
typedef LatticeGraphDescriptor::size_type size_type;
typedef LatticeGraphDescriptor::vector_type vector_type;
typedef LatticeGraphDescriptor::boundary_crossing_type boundary_crossing_type;
};
is a useful typedef for a default lattice_graph class. It can be used to create a graph from a LatticeGraphDescriptor.typedef lattice_graph<LatticeGraphDescriptor,coordinate_graph_type> HypercubicLatticeGraph;
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)