ALPS Project: lattice library

Header file: lattice/graphproperties.h

includes property types for the graphs used in the lattice library, as well as the default graph type coordinate_graph_type.

Synopsis

namespace alps {

// default types for property values
typedef std::vector<double> coordinate_type;
typedef unsigned int type_type;

// vertex properties
struct vertex_type_t { typedef boost::vertex_property_tag kind; };
struct coordinate_t { typedef boost::vertex_property_tag kind; };
struct parity_t { typedef boost::vertex_property_tag kind; };
using boost::vertex_index_t;
typedef vertex_type_t site_type_t;

// edge properties
struct edge_type_t { typedef boost::edge_property_tag kind; };
struct boundary_crossing_t { typedef boost::edge_property_tag kind; };
struct source_offset_t { typedef boost::edge_property_tag kind; };
struct target_offset_t { typedef boost::edge_property_tag kind; };
using boost::edge_index_t;
typedef edge_type_t bond_type_t;

// graph properties
struct graph_name_t { typedef boost::graph_property_tag kind; };
struct dimension_t { typedef boost::graph_property_tag kind; };

typedef boost::adjacency_list<boost::vecS,boost::vecS,boost::undirectedS,
/* ...*/,boost::vecS> coordinate_graph_type;

}

Default types

  typedef std::vector<double> coordinate_type;

The current implementation stores coordinates as vectors of doubles. This might be replaces by a faster and less memory-consuming type if needed.

  typedef unsigned int type_type;

The current implementation stores edge and vertex (bond and site) types as unsigned integers. This might be replaces by strings if non-numeric types are desired in the future.

The coordinate_graph_type class

The coordinate_graph_type type is the default graph type of the ALPS library. It is a Boost adjacency list graph implementing the following properties as internal properties:


Vertex property Type Note
vertex_type_t unsigned int The type (color) of the vertex
coordinate_t std::vector<double> The coordinate of the vertex
parity_t int8_t The parity of a site (0 or 1) on a bipartite graph
vertex_index_t The vertex index, predefined for boost::adjacency_list
Edge property Type Note
edge_type_t unsigned int The type (color) of the edge
edge_index_t unsigned int The edge index
boundary_crossing_t boundary_crossing Indicates whether an edge crosses a boundary of the lattice.
bond_vector_t std::vector<double> a vector connecting the two sites of a bond
bond_vector_relative_t std::vector<double> a vector connecting the two sites of a bond, relative to the basis vectors and the extent of the lattice. This is thus always in the range [0,1[^dimension
Graph property Type Note
graph_name_t std::string The name of the graph
dimension_t std::size_t The dimension of the graph (dimension of the vertex coordinates)

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)