// -*- c++ -*- #ifndef SYM_MAP_H #define SYM_MAP_H ///\ingroup graphmaps ///\file ///\brief Graph maps that construates and destruates ///their elements dynamically. namespace hugo { /// \addtogroup graphmaps /// @{ /** The SymEdgeIt is wrapper class for the EdgeIt. It can be used to * iterate on the symmetric maps when all of the edge - reverse edge pair * has different parity. */ template class SymEdgeIt : public EdgeIt { public: /** Default constructor. */ SymEdgeIt() : EdgeIt() {} /** Graph initialized constructor. */ SymEdgeIt(const Graph& graph) : EdgeIt(graph) { while ( (EdgeIt::n & 1) && EdgeIt::n != -1) { EdgeIt::operator++(); } } /** Creating invelid SymEdgeIt. */ SymEdgeIt(Invalid invalid) : EdgeIt(invalid) {} /** SymEdgeIt from the given Edge. */ SymEdgeIt(const Graph& graph, const Edge& edge) : EdgeIt(graph, edge) { while ( (EdgeIt::n & 1) && EdgeIt::n != -1) { EdgeIt::operator++(); } } /** Increase operator. */ SymEdgeIt& operator++() { EdgeIt::operator++(); while ( (EdgeIt::n & 1) && EdgeIt::n != -1) { EdgeIt::operator++(); } return *this; } }; /** The SymMap template class is graph map structure what * wraps an other map structure to use as symmetric map structure. * * The template parameter is the MapRegistry that the maps * will belong to and the ValueType. */ template