misc
authormarci
Fri, 23 Apr 2004 08:32:18 +0000
changeset 381d72470496fbe
parent 380 6399494e30b1
child 382 f177fc597abd
misc
src/work/marci/graph_wrapper.h
     1.1 --- a/src/work/marci/graph_wrapper.h	Fri Apr 23 08:08:41 2004 +0000
     1.2 +++ b/src/work/marci/graph_wrapper.h	Fri Apr 23 08:32:18 2004 +0000
     1.3 @@ -907,6 +907,8 @@
     1.4        ClassNodeIt(const BipartiteGraphWrapper<Graph>& _G, bool _class) { 
     1.5  	_G.s_false_t_true_map->first(n, _class); 
     1.6        }
     1.7 +      //FIXME needed in new concept, important here
     1.8 +      ClassNodeIt(const Node& _n) : n(_n) { }
     1.9        operator Node() const { return n; }
    1.10      };
    1.11  //     class SNodeIt {
    1.12 @@ -1011,10 +1013,10 @@
    1.13      }
    1.14  
    1.15      bool inSClass(const Node& n) const {
    1.16 -      return !(this->s_false_t_true_map[n]);
    1.17 +      return !(*(this->s_false_t_true_map))[n];
    1.18      }
    1.19      bool inTClass(const Node& n) const {
    1.20 -      return (this->s_false_t_true_map[n]);
    1.21 +      return (*(this->s_false_t_true_map))[n];
    1.22      }
    1.23    };
    1.24  
    1.25 @@ -1026,26 +1028,32 @@
    1.26    class stGraphWrapper : public GraphWrapper<Graph> {
    1.27    public:
    1.28      class Node; 
    1.29 +    friend class Node;
    1.30  //GN, int
    1.31  //0 normalis, 1 s, 2, true, ez az iteralasi sorrend, 
    1.32  //es a vege a false azaz (invalid, 3)    
    1.33      class NodeIt;
    1.34 +    friend class NodeIt;
    1.35  //GNI, int
    1.36      class Edge;
    1.37 +    friend class Edge;
    1.38  //GE, int, GN
    1.39  //0 normalis, 1 s->vmi, 2 vmi->t, ez a sorrend,
    1.40  //invalid: (invalid, 3, invalid)
    1.41      class OutEdgeIt;
    1.42 +    friend class OutEdgeIt;
    1.43  //GO, int, GNI
    1.44  //normalis pontbol (first, 0, invalid), ..., (invalid, 2, vmi), ... (invalid, 3, invalid)
    1.45  //s-bol (invalid, 1, first), ... (invalid, 3, invalid)
    1.46  //t-bol (invalid, 3, invalid)
    1.47      class InEdgeIt;
    1.48 +    friend class InEdgeIt;
    1.49  //GI, int, GNI
    1.50  //normalis pontbol (first, 0, invalid), ..., (invalid, 1, vmi), ... (invalid, 3, invalid)
    1.51  //s-be (invalid, 3, invalid)
    1.52  //t-be (invalid, 2, first), ... (invalid, 3, invalid)
    1.53      class EdgeIt;
    1.54 +    friend class EdgeIt;
    1.55  //(first, 0, invalid) ...
    1.56  //(invalid, 1, vmi)
    1.57  //(invalid, 2, vmi)
    1.58 @@ -1103,7 +1111,7 @@
    1.59        NodeIt(const typename Graph::NodeIt& _n, int _spec) : 
    1.60  	n(_n), spec(_spec) { }
    1.61        NodeIt(const Invalid& i) : n(i), spec(3) { }
    1.62 -      NodeIt(const GraphWrapper<Graph>& _G) : n(*(_G.graph)), spec(0) { 
    1.63 +      NodeIt(const stGraphWrapper<Graph>& _G) : n(*(_G.graph)), spec(0) { 
    1.64  	if (!_G->valid(n)) spec=1;
    1.65        }
    1.66        operator Node() const { return Node(n, spec); }
    1.67 @@ -1148,10 +1156,10 @@
    1.68  	e(_e), spec(_spec), n(_n) { 
    1.69        }
    1.70        OutEdgeIt(const Invalid& i) : e(i), spec(3), n(i) { }
    1.71 -      OutEdgeIt(const GraphWrapper<Graph>& _G, const Node& _n) {
    1.72 +      OutEdgeIt(const stGraphWrapper<Graph>& _G, const Node& _n) {
    1.73  	switch (_n.spec) {
    1.74  	  case 0 : 
    1.75 -	    if (_G.graph->inSClass) { //S, van normalis kiel 
    1.76 +	    if (_G.graph->inSClass(_n)) { //S, van normalis kiel 
    1.77  	      e=typename Graph::OutEdgeIt(*(_G.graph), 
    1.78  					  typename Graph::Node(_n)); 
    1.79  	      spec=0;
    1.80 @@ -1191,10 +1199,10 @@
    1.81  	e(_e), spec(_spec), n(_n) { 
    1.82        }
    1.83        InEdgeIt(const Invalid& i) : e(i), spec(3), n(i) { }
    1.84 -      InEdgeIt(const GraphWrapper<Graph>& _G, const Node& _n) {
    1.85 +      InEdgeIt(const stGraphWrapper<Graph>& _G, const Node& _n) {
    1.86  	switch (_n.spec) {
    1.87  	  case 0 : 
    1.88 -	    if (_G.graph->inTClass) { //T, van normalis beel 
    1.89 +	    if (_G.graph->inTClass(_n)) { //T, van normalis beel 
    1.90  	      e=typename Graph::InEdgeIt(*(_G.graph), 
    1.91  					 typename Graph::Node(_n)); 
    1.92  	      spec=0;
    1.93 @@ -1232,7 +1240,7 @@
    1.94  	     const typename Graph::ClassNodeIt& _n) : 
    1.95  	e(_e), spec(_spec), n(_n) { }
    1.96        EdgeIt(const Invalid& i) : e(i), spec(3), n(i) { }
    1.97 -      EdgeIt(const GraphWrapper<Graph>& _G) : 
    1.98 +      EdgeIt(const stGraphWrapper<Graph>& _G) : 
    1.99  	e(*(_G.graph)), spec(0), n(INVALID) { 
   1.100  	if (!_G.graph->valid(e)) {
   1.101  	  spec=1;