ALPS Project: lattice library

Header file: lattice/parity.h

defines a parity function for bipartitie graphs. A bipartite graph that separates into two subgraphs, with edges only between but he two subgraphs but not within either of them.

Synopsis

namespace alps {
template <class G, class ParityMap> 
bool set_parity(ParityMap& map, const G& g)

template <class G> 
bool set_parity(G& g);
}

The set_parity functions

template <class G, class ParityMap> 
bool set_parity(ParityMap& map, const G& g)
checks whether a graph is bipartite and returns true if it is. In addition, if the graph is bipartite the vertex property map map is set to 0 and 1 for vertices in the two subgraphs of the bipartite graph.
template <class G> 
bool set_parity(G& g);
same as above, but gets the property map of type parity_t from the graph itself. G must be a model of ReflectablePropertyGraph

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)