equal
deleted
inserted
replaced
425 /// |
425 /// |
426 /// This class is converts unsafely the node to blue node |
426 /// This class is converts unsafely the node to blue node |
427 /// object. If the node is not from the blue partition, then it |
427 /// object. If the node is not from the blue partition, then it |
428 /// returns INVALID. |
428 /// returns INVALID. |
429 BlueNode asBlueNode(const Node&) const { return BlueNode(); } |
429 BlueNode asBlueNode(const Node&) const { return BlueNode(); } |
430 |
|
431 /// \brief Convert the node to either red or blue node. |
|
432 /// |
|
433 /// If the node is from the red partition then it is returned in |
|
434 /// first and second is INVALID. If the node is from the blue |
|
435 /// partition then it is returned in second and first is |
|
436 /// INVALID. If the node INVALID then both first and second are |
|
437 /// INVALID in the return value. |
|
438 std::pair<RedNode, BlueNode> asRedBlueNode(const Node&) const { |
|
439 return std::make_pair(RedNode(), BlueNode()); |
|
440 } |
|
441 |
430 |
442 template <typename _BpGraph> |
431 template <typename _BpGraph> |
443 struct Constraints { |
432 struct Constraints { |
444 typedef typename _BpGraph::Node Node; |
433 typedef typename _BpGraph::Node Node; |
445 typedef typename _BpGraph::RedNode RedNode; |
434 typedef typename _BpGraph::RedNode RedNode; |
465 bn = bpgraph.blueNode(e); |
454 bn = bpgraph.blueNode(e); |
466 rn = bpgraph.asRedNodeUnsafe(rnan); |
455 rn = bpgraph.asRedNodeUnsafe(rnan); |
467 bn = bpgraph.asBlueNodeUnsafe(bnan); |
456 bn = bpgraph.asBlueNodeUnsafe(bnan); |
468 rn = bpgraph.asRedNode(rnan); |
457 rn = bpgraph.asRedNode(rnan); |
469 bn = bpgraph.asBlueNode(bnan); |
458 bn = bpgraph.asBlueNode(bnan); |
470 std::pair<RedNode, BlueNode> p = bpgraph.asRedBlueNode(rnan); |
459 ignore_unused_variable_warning(b); |
471 ignore_unused_variable_warning(b,p); |
|
472 } |
460 } |
473 } |
461 } |
474 |
462 |
475 const _BpGraph& bpgraph; |
463 const _BpGraph& bpgraph; |
476 }; |
464 }; |