COIN-OR::LEMON - Graph Library

Changeset 1979:c2992fd74dad in lemon-0.x for lemon/full_graph.h


Ignore:
Timestamp:
02/22/06 19:26:56 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2569
Message:

Mergeing extendermerge branch
Changes:

the extender system
resize for static size graph
UGraphExtender => UndirectGraphExtender?

UGraphExtenders with changed meaning

Some UGraphExtender /SubUGraphExtenders, DirectUGraphExtender/
GridGraph? => GridUGraph
radix sort to ansi compatible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/full_graph.h

    r1956 r1979  
    2323
    2424
    25 #include <lemon/bits/iterable_graph_extender.h>
    26 #include <lemon/bits/alteration_notifier.h>
    27 #include <lemon/bits/static_map.h>
    2825#include <lemon/bits/graph_extender.h>
     26
    2927
    3028#include <lemon/invalid.h>
     
    192190  };
    193191
    194   typedef StaticMappableGraphExtender<
    195     IterableGraphExtender<
    196     AlterableGraphExtender<
    197     GraphExtender<FullGraphBase> > > > ExtendedFullGraphBase;
     192  typedef GraphExtender<FullGraphBase> ExtendedFullGraphBase;
    198193
    199194  /// \ingroup graphs
     
    212207  public:
    213208
     209    typedef ExtendedFullGraphBase Parent;
     210
     211    /// \brief Constructor
     212    ///
    214213    FullGraph(int n) { construct(n); }
     214
     215    /// \brief Resize the graph
     216    ///
     217    void resize(int n) {
     218      Parent::getNotifier(Edge()).clear();
     219      Parent::getNotifier(Node()).clear();
     220      construct(n);
     221      Parent::getNotifier(Node()).build();
     222      Parent::getNotifier(Edge()).build();
     223    }
    215224  };
    216225
     
    380389  };
    381390
    382   typedef StaticMappableUGraphExtender<
    383     IterableUGraphExtender<
    384     AlterableUGraphExtender<
    385     UGraphExtender<FullUGraphBase> > > > ExtendedFullUGraphBase;
     391  typedef UGraphExtender<UGraphBaseExtender<FullUGraphBase> >
     392  ExtendedFullUGraphBase;
    386393
    387394  /// \ingroup graphs
     
    402409  class FullUGraph : public ExtendedFullUGraphBase {
    403410  public:
     411
     412    typedef ExtendedFullUGraphBase Parent;
     413
     414    /// \brief Constructor
    404415    FullUGraph(int n) { construct(n); }
     416
     417    /// \brief Resize the graph
     418    ///
     419    void resize(int n) {
     420      Parent::getNotifier(Edge()).clear();
     421      Parent::getNotifier(UEdge()).clear();
     422      Parent::getNotifier(Node()).clear();
     423      construct(n);
     424      Parent::getNotifier(Node()).build();
     425      Parent::getNotifier(UEdge()).build();
     426      Parent::getNotifier(Edge()).build();
     427    }
    405428  };
    406429
     
    578601
    579602
    580   typedef StaticMappableBpUGraphExtender<
    581     IterableBpUGraphExtender<
    582     AlterableBpUGraphExtender<
    583     BpUGraphExtender <
    584     FullBpUGraphBase> > > >
    585   ExtendedFullBpUGraphBase;
     603  typedef BpUGraphExtender< BpUGraphBaseExtender<
     604    FullBpUGraphBase> > ExtendedFullBpUGraphBase;
    586605
    587606
     
    600619    public ExtendedFullBpUGraphBase {
    601620  public:
     621
    602622    typedef ExtendedFullBpUGraphBase Parent;
     623
    603624    FullBpUGraph(int aNodeNum, int bNodeNum) {
    604625      Parent::construct(aNodeNum, bNodeNum);
    605626    }
     627    /// \brief Resize the graph
     628    ///
     629    void resize(int n, int m) {
     630      Parent::getNotifier(Edge()).clear();
     631      Parent::getNotifier(UEdge()).clear();
     632      Parent::getNotifier(Node()).clear();
     633      construct(n, m);
     634      Parent::getNotifier(Node()).build();
     635      Parent::getNotifier(UEdge()).build();
     636      Parent::getNotifier(Edge()).build();
     637    }
    606638  };
    607639
Note: See TracChangeset for help on using the changeset viewer.