namespace alps {
class EmptyUnitCell {
public:
EmptyUnitCell(std::size_t dim=0);
std::size_t dimension() const;
};
dimensional_traits<EmptyUnitCell>::dimension_type dimension(const EmptyUnitCell& c);
class GraphUnitCell
{
public:
boost::adjacency_list<boost::vecS,boost::vecS,boost::directedS,/*...*/> graph_type;
GraphUnitCell();
GraphUnitCell(const XMLTag&, std::istream&);
const GraphUnitCell& operator=(const EmptyUnitCell& e);
void write_xml(oxstream&) const;
graph_type& graph();
const graph_type& graph() const;
std::size_t dimension() const;
const std::string& name() const;
};
dimensional_traits< GraphUnitCell>::dimension_type dimension(const GraphUnitCell& c);
oxstream& operator<<(oxstream& out, const GraphUnitCell& u)
std::ostream& operator<<(std::ostream& out, const GraphUnitCell& u)
typedef std::map<std::string,GraphUnitCell> UnitCellMap;
}
The constrictors takes an optional dimension argument.EmptyUnitCell(std::size_t dim=0);
returns the dimension of the unit cell.std::size_t dimension() const;
The graph is a directed adjacency list graph. The directed property is necessary for a graph with more than one edge between two vertices. The internal properties are:boost::adjacency_list<boost::vecS,boost::vecS,boost::directedS,/*...*/> graph_type;
Vertex property | Type | Note |
vertex_type_t | type_type |
The type (color) of the vertex |
coordinate_t | coordinate_type | The coordinate of the vertex |
vertex_index_t | The vertex index, predefined for boost::adjacency_list | |
Edge property | Type | Note |
edge_type_t | type_type |
The type (color) of the edge |
source_offset_t | std::vector<int> | cell offset of the source vertex |
target_offset_t | std::vector<int> | cell offset of the target vertex |
bond_vector_t |
coordinate_type | vector connecting two sites of the bond, relative
to the basis vectors of the lattice |
the default constructor.GraphUnitCell();
reads the unit cell in XML from a stream assuming the Lattice XML schema on http://xml.comp-phys.org. The start tag <UNITCELL ...> has already been read and is passed as a XMLTag argument.GraphUnitCell(const XMLTag&, std::istream&);
writes the unit cell 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(oxstream&, const std::string& name= "") const;
return the graph associated with the unit cell.graph_type& graph();
const graph_type& graph() const;
the dimension of the unit cellstd::size_t dimension() const;
the name of the unit cell, as read from the XML input.const std::string& name() const;
The output to an oxstream or std::ostream uses the write_xml member function.oxstream& operator<<(oxstream& out, const lattice:: GraphUnitCell& u)
std::ostream& operator<<(std::ostream& out, const lattice:: GraphUnitCell& u)
is a map from the name of unit cells, to a GraphUnitCell, used when parsing XML input for lattices.typedef std::map<std::string,GraphUnitCell> UnitCellMap;
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)