src/work/alpar/boolmap_iter.cc
changeset 1001 afe5cf34aa50
parent 986 e997802b855c
child 1280 f2255b96c19c
equal deleted inserted replaced
2:b1284fb03924 3:01e690c95e5e
    11 {
    11 {
    12 public:
    12 public:
    13   typedef GG Graph;
    13   typedef GG Graph;
    14   typedef typename GG::Edge Edge;
    14   typedef typename GG::Edge Edge;
    15   
    15   
    16   typedef Edge KeyType;
    16   typedef Edge Key;
    17   typedef bool ValueType;
    17   typedef bool Value;
    18   
    18   
    19   friend class RefType;
    19   friend class RefType;
    20   friend class FalseIterator;
    20   friend class FalseIterator;
    21   friend class TrueIterator;
    21   friend class TrueIterator;
    22 
    22 
    65     BoolIterEdgeMap &M;
    65     BoolIterEdgeMap &M;
    66     Edge e;
    66     Edge e;
    67   public:
    67   public:
    68     RefType(BoolIterEdgeMap &_M,Edge _e) : M(_M), e(_e) { }
    68     RefType(BoolIterEdgeMap &_M,Edge _e) : M(_M), e(_e) { }
    69     
    69     
    70     operator ValueType() const 
    70     operator Value() const 
    71     {
    71     {
    72       return M.isTrue(e);
    72       return M.isTrue(e);
    73       
    73       
    74     }
    74     }
    75     ValueType operator = (ValueType v) const
    75     Value operator = (Value v) const
    76     {
    76     {
    77       if(v) M.setTrue(e); 
    77       if(v) M.setTrue(e); 
    78       else M.setFalse(e);
    78       else M.setFalse(e);
    79       return v;
    79       return v;
    80     }
    80     }