Graphs¶
This class is defined in the header lib/wolff.hpp
.
-
\template <class vertex_prop = std::tuple\<>, class edge_prop = std::tuple\<>> graph
Lattices are described by objects of class
graph
, a minimal implementation of graphs. Can be called with graph<> if no properties need to be associated with vertices or edges. Otherwise, those properties can be supplied as classes.-
unsigned
graph
::
D
¶ The dimension of the graph. This property is unused by the core library.
-
unsigned
graph
::
L
¶ The linear size of the graph. This property is unused by the core library.
-
unsigned
graph
::
ne
¶ The number of edges in the graph. This property is unused by the core library.
-
unsigned
graph
::
nv
¶ The number of vertices in the graph.
-
class
graph
::
vertex
¶ This class describes the vertices on the graph.
-
vertex_prop
prop
¶ Template-defined class which stores optional properties of the vertex.
-
vertex_prop
-
class
graph
::
halfedge
¶ This class describes the halfedges on the graph.
-
edge_prop
prop
¶ Template-defined class which stores optional properties of the edge.
-
edge_prop
-
graph
::
graph
()¶ The default constructor. Initializes an empty graph, i.e.,
D
,L
,ne
, andnv
are all zero andvertices
is uninitialized.
-
graph
::
graph
(unsigned D, unsigned L)¶ Initializes a graph of a
D
-dimensional hypercubic lattice withL
vertices per side. This is the only nontrivial graph constructor supplied by the core library. The library will work with arbitrary graphs, and if a different lattice is needed consider calling the default constructor and populating the member objects youself before handing the graph to thesystem
constructor.- Parameters
unsigned D – The dimension of space.
unsigned L – The number of vertices per edge of the hypercube.
-
void
graph
::
add_ghost
()¶ Calling this function on a graph object will add a ghost site to the graph. Explicitly, a new vertex is added that is adjacent to every other vertex in the graph. This vertex will have the last index, which is equal to number of vertices in the original graph.
-
unsigned