lemon/concepts/graph_components.h
changeset 953 b873350e6258
parent 666 1993af615e68
child 954 be7dd3a8d6a3
child 963 761fe0846f49
equal deleted inserted replaced
17:5a8be9f58a10 21:03f2ab84ea0d
   113           b = (ia < ib);
   113           b = (ia < ib);
   114         }
   114         }
   115 
   115 
   116         const _GraphItem &ia;
   116         const _GraphItem &ia;
   117         const _GraphItem &ib;
   117         const _GraphItem &ib;
       
   118         Constraints() {}
   118       };
   119       };
   119     };
   120     };
   120 
   121 
   121     /// \brief Base skeleton class for directed graphs.
   122     /// \brief Base skeleton class for directed graphs.
   122     ///
   123     ///
   172             n = digraph.oppositeNode(n, e);
   173             n = digraph.oppositeNode(n, e);
   173           }
   174           }
   174         }
   175         }
   175 
   176 
   176         const _Digraph& digraph;
   177         const _Digraph& digraph;
       
   178         Constraints() {}
   177       };
   179       };
   178     };
   180     };
   179 
   181 
   180     /// \brief Base skeleton class for undirected graphs.
   182     /// \brief Base skeleton class for undirected graphs.
   181     ///
   183     ///
   288             ignore_unused_variable_warning(d);
   290             ignore_unused_variable_warning(d);
   289           }
   291           }
   290         }
   292         }
   291 
   293 
   292         const _Graph& graph;
   294         const _Graph& graph;
       
   295       Constraints() {}
   293       };
   296       };
   294 
   297 
   295     };
   298     };
   296 
   299 
   297     /// \brief Skeleton class for \e idable directed graphs.
   300     /// \brief Skeleton class for \e idable directed graphs.
   367           eid = digraph.maxArcId();
   370           eid = digraph.maxArcId();
   368           ignore_unused_variable_warning(eid);
   371           ignore_unused_variable_warning(eid);
   369         }
   372         }
   370 
   373 
   371         const _Digraph& digraph;
   374         const _Digraph& digraph;
       
   375         Constraints() {}
   372       };
   376       };
   373     };
   377     };
   374 
   378 
   375     /// \brief Skeleton class for \e idable undirected graphs.
   379     /// \brief Skeleton class for \e idable undirected graphs.
   376     ///
   380     ///
   419           ueid = graph.maxEdgeId();
   423           ueid = graph.maxEdgeId();
   420           ignore_unused_variable_warning(ueid);
   424           ignore_unused_variable_warning(ueid);
   421         }
   425         }
   422 
   426 
   423         const _Graph& graph;
   427         const _Graph& graph;
       
   428         Constraints() {}
   424       };
   429       };
   425     };
   430     };
   426 
   431 
   427     /// \brief Concept class for \c NodeIt, \c ArcIt and \c EdgeIt types.
   432     /// \brief Concept class for \c NodeIt, \c ArcIt and \c EdgeIt types.
   428     ///
   433     ///
   496 
   501 
   497           Item bi = it1;
   502           Item bi = it1;
   498           bi = it2;
   503           bi = it2;
   499         }
   504         }
   500         const GR& g;
   505         const GR& g;
       
   506         Constraints() {}
   501       };
   507       };
   502     };
   508     };
   503 
   509 
   504     /// \brief Concept class for \c InArcIt, \c OutArcIt and 
   510     /// \brief Concept class for \c InArcIt, \c OutArcIt and 
   505     /// \c IncEdgeIt types.
   511     /// \c IncEdgeIt types.
   584           Item e = it1;
   590           Item e = it1;
   585           e = it2;
   591           e = it2;
   586         }
   592         }
   587         const Base& node;
   593         const Base& node;
   588         const GR& graph;
   594         const GR& graph;
       
   595         Constraints() {}
   589       };
   596       };
   590     };
   597     };
   591 
   598 
   592     /// \brief Skeleton class for iterable directed graphs.
   599     /// \brief Skeleton class for iterable directed graphs.
   593     ///
   600     ///
   760             ignore_unused_variable_warning(n);
   767             ignore_unused_variable_warning(n);
   761           }
   768           }
   762         }
   769         }
   763 
   770 
   764         const _Digraph& digraph;
   771         const _Digraph& digraph;
       
   772         Constraints() {}
   765       };
   773       };
   766     };
   774     };
   767 
   775 
   768     /// \brief Skeleton class for iterable undirected graphs.
   776     /// \brief Skeleton class for iterable undirected graphs.
   769     ///
   777     ///
   884             n = graph.runningNode(ieit);
   892             n = graph.runningNode(ieit);
   885           }
   893           }
   886         }
   894         }
   887 
   895 
   888         const _Graph& graph;
   896         const _Graph& graph;
       
   897         Constraints() {}
   889       };
   898       };
   890     };
   899     };
   891 
   900 
   892     /// \brief Skeleton class for alterable directed graphs.
   901     /// \brief Skeleton class for alterable directed graphs.
   893     ///
   902     ///
   941           ignore_unused_variable_warning(nn);
   950           ignore_unused_variable_warning(nn);
   942           ignore_unused_variable_warning(en);
   951           ignore_unused_variable_warning(en);
   943         }
   952         }
   944 
   953 
   945         const _Digraph& digraph;
   954         const _Digraph& digraph;
       
   955         Constraints() {}
   946       };
   956       };
   947     };
   957     };
   948 
   958 
   949     /// \brief Skeleton class for alterable undirected graphs.
   959     /// \brief Skeleton class for alterable undirected graphs.
   950     ///
   960     ///
   982             = graph.notifier(typename _Graph::Edge());
   992             = graph.notifier(typename _Graph::Edge());
   983           ignore_unused_variable_warning(uen);
   993           ignore_unused_variable_warning(uen);
   984         }
   994         }
   985 
   995 
   986         const _Graph& graph;
   996         const _Graph& graph;
       
   997         Constraints() {}
   987       };
   998       };
   988     };
   999     };
   989 
  1000 
   990     /// \brief Concept class for standard graph maps.
  1001     /// \brief Concept class for standard graph maps.
   991     ///
  1002     ///
  1059         }
  1070         }
  1060 
  1071 
  1061         const _Map &m;
  1072         const _Map &m;
  1062         const GR &g;
  1073         const GR &g;
  1063         const typename GraphMap::Value &t;
  1074         const typename GraphMap::Value &t;
       
  1075         Constraints() {}
  1064       };
  1076       };
  1065 
  1077 
  1066     };
  1078     };
  1067 
  1079 
  1068     /// \brief Skeleton class for mappable directed graphs.
  1080     /// \brief Skeleton class for mappable directed graphs.
  1197               DummyArcMap >();
  1209               DummyArcMap >();
  1198           }
  1210           }
  1199         }
  1211         }
  1200 
  1212 
  1201         const _Digraph& digraph;
  1213         const _Digraph& digraph;
       
  1214         Constraints() {}
  1202       };
  1215       };
  1203     };
  1216     };
  1204 
  1217 
  1205     /// \brief Skeleton class for mappable undirected graphs.
  1218     /// \brief Skeleton class for mappable undirected graphs.
  1206     ///
  1219     ///
  1282               DummyEdgeMap >();
  1295               DummyEdgeMap >();
  1283           }
  1296           }
  1284         }
  1297         }
  1285 
  1298 
  1286         const _Graph& graph;
  1299         const _Graph& graph;
       
  1300         Constraints() {}
  1287       };
  1301       };
  1288     };
  1302     };
  1289 
  1303 
  1290     /// \brief Skeleton class for extendable directed graphs.
  1304     /// \brief Skeleton class for extendable directed graphs.
  1291     ///
  1305     ///
  1326           typename _Digraph::Arc arc;
  1340           typename _Digraph::Arc arc;
  1327           arc = digraph.addArc(node_a, node_b);
  1341           arc = digraph.addArc(node_a, node_b);
  1328         }
  1342         }
  1329 
  1343 
  1330         _Digraph& digraph;
  1344         _Digraph& digraph;
       
  1345         Constraints() {}
  1331       };
  1346       };
  1332     };
  1347     };
  1333 
  1348 
  1334     /// \brief Skeleton class for extendable undirected graphs.
  1349     /// \brief Skeleton class for extendable undirected graphs.
  1335     ///
  1350     ///
  1370           typename _Graph::Edge edge;
  1385           typename _Graph::Edge edge;
  1371           edge = graph.addEdge(node_a, node_b);
  1386           edge = graph.addEdge(node_a, node_b);
  1372         }
  1387         }
  1373 
  1388 
  1374         _Graph& graph;
  1389         _Graph& graph;
       
  1390         Constraints() {}
  1375       };
  1391       };
  1376     };
  1392     };
  1377 
  1393 
  1378     /// \brief Skeleton class for erasable directed graphs.
  1394     /// \brief Skeleton class for erasable directed graphs.
  1379     ///
  1395     ///
  1409           const typename _Digraph::Arc arc(INVALID);
  1425           const typename _Digraph::Arc arc(INVALID);
  1410           digraph.erase(arc);
  1426           digraph.erase(arc);
  1411         }
  1427         }
  1412 
  1428 
  1413         _Digraph& digraph;
  1429         _Digraph& digraph;
       
  1430         Constraints() {}
  1414       };
  1431       };
  1415     };
  1432     };
  1416 
  1433 
  1417     /// \brief Skeleton class for erasable undirected graphs.
  1434     /// \brief Skeleton class for erasable undirected graphs.
  1418     ///
  1435     ///
  1448           const typename _Graph::Edge edge(INVALID);
  1465           const typename _Graph::Edge edge(INVALID);
  1449           graph.erase(edge);
  1466           graph.erase(edge);
  1450         }
  1467         }
  1451 
  1468 
  1452         _Graph& graph;
  1469         _Graph& graph;
       
  1470         Constraints() {}
  1453       };
  1471       };
  1454     };
  1472     };
  1455 
  1473 
  1456     /// \brief Skeleton class for clearable directed graphs.
  1474     /// \brief Skeleton class for clearable directed graphs.
  1457     ///
  1475     ///
  1476           checkConcept<Base, _Digraph>();
  1494           checkConcept<Base, _Digraph>();
  1477           digraph.clear();
  1495           digraph.clear();
  1478         }
  1496         }
  1479 
  1497 
  1480         _Digraph& digraph;
  1498         _Digraph& digraph;
       
  1499         Constraints() {}
  1481       };
  1500       };
  1482     };
  1501     };
  1483 
  1502 
  1484     /// \brief Skeleton class for clearable undirected graphs.
  1503     /// \brief Skeleton class for clearable undirected graphs.
  1485     ///
  1504     ///
  1504           checkConcept<Base, _Graph>();
  1523           checkConcept<Base, _Graph>();
  1505           graph.clear();
  1524           graph.clear();
  1506         }
  1525         }
  1507 
  1526 
  1508         _Graph& graph;
  1527         _Graph& graph;
       
  1528         Constraints() {}
  1509       };
  1529       };
  1510     };
  1530     };
  1511 
  1531 
  1512   }
  1532   }
  1513 
  1533