diff -r cd72eae05bdf -r 3c00344f49c9 lemon/bits/traits.h --- a/lemon/bits/traits.h Mon Jul 16 16:21:40 2018 +0200 +++ b/lemon/bits/traits.h Wed Oct 17 19:14:07 2018 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -151,6 +151,88 @@ }; + template + struct RedNodeNotifierIndicator { + typedef InvalidType Type; + }; + template + struct RedNodeNotifierIndicator< + GR, + typename enable_if::type + > { + typedef typename GR::RedNodeNotifier Type; + }; + + template + class ItemSetTraits { + public: + + typedef GR BpGraph; + typedef GR Graph; + typedef GR Digraph; + + typedef typename GR::RedNode Item; + typedef typename GR::RedNodeIt ItemIt; + + typedef typename RedNodeNotifierIndicator::Type ItemNotifier; + + template + class Map : public GR::template RedNodeMap { + typedef typename GR::template RedNodeMap Parent; + + public: + typedef typename GR::template RedNodeMap Type; + typedef typename Parent::Value Value; + + Map(const GR& _bpgraph) : Parent(_bpgraph) {} + Map(const GR& _bpgraph, const Value& _value) + : Parent(_bpgraph, _value) {} + + }; + + }; + + template + struct BlueNodeNotifierIndicator { + typedef InvalidType Type; + }; + template + struct BlueNodeNotifierIndicator< + GR, + typename enable_if::type + > { + typedef typename GR::BlueNodeNotifier Type; + }; + + template + class ItemSetTraits { + public: + + typedef GR BpGraph; + typedef GR Graph; + typedef GR Digraph; + + typedef typename GR::BlueNode Item; + typedef typename GR::BlueNodeIt ItemIt; + + typedef typename BlueNodeNotifierIndicator::Type ItemNotifier; + + template + class Map : public GR::template BlueNodeMap { + typedef typename GR::template BlueNodeMap Parent; + + public: + typedef typename GR::template BlueNodeMap Type; + typedef typename Parent::Value Value; + + Map(const GR& _bpgraph) : Parent(_bpgraph) {} + Map(const GR& _bpgraph, const Value& _value) + : Parent(_bpgraph, _value) {} + + }; + + }; + template struct MapTraits { typedef False ReferenceMapTag;