lemon/bits/graph_extender.h
changeset 1103 c0c2f5c87aa6
parent 1026 699c7eac2c6d
child 1092 dceba191c00d
equal deleted inserted replaced
19:6520e1e2dc27 20:5988681250cd
   838       } else {
   838       } else {
   839         return Parent::asBlueNodeUnsafe(node);
   839         return Parent::asBlueNodeUnsafe(node);
   840       }
   840       }
   841     }
   841     }
   842 
   842 
   843     std::pair<RedNode, BlueNode> asRedBlueNode(const Node& node) const {
       
   844       if (node == INVALID) {
       
   845         return std::make_pair(RedNode(INVALID), BlueNode(INVALID));
       
   846       } else if (Parent::red(node)) {
       
   847         return std::make_pair(Parent::asRedNodeUnsafe(node), BlueNode(INVALID));
       
   848       } else {
       
   849         return std::make_pair(RedNode(INVALID), Parent::asBlueNodeUnsafe(node));
       
   850       }
       
   851     }
       
   852 
       
   853     // Alterable extension
   843     // Alterable extension
   854 
   844 
   855     typedef AlterationNotifier<BpGraphExtender, Node> NodeNotifier;
   845     typedef AlterationNotifier<BpGraphExtender, Node> NodeNotifier;
   856     typedef AlterationNotifier<BpGraphExtender, RedNode> RedNodeNotifier; 
   846     typedef AlterationNotifier<BpGraphExtender, RedNode> RedNodeNotifier; 
   857     typedef AlterationNotifier<BpGraphExtender, BlueNode> BlueNodeNotifier;
   847     typedef AlterationNotifier<BpGraphExtender, BlueNode> BlueNodeNotifier;