... | ... |
@@ -334,64 +334,76 @@ |
334 | 334 |
ListDigraph(const ListDigraph &) :ExtendedListDigraphBase() {}; |
335 | 335 |
///\brief Assignment of ListDigraph to another one is \e not allowed. |
336 | 336 |
///Use copyDigraph() instead. |
337 | 337 |
|
338 | 338 |
///Assignment of ListDigraph to another one is \e not allowed. |
339 | 339 |
///Use copyDigraph() instead. |
340 | 340 |
void operator=(const ListDigraph &) {} |
341 | 341 |
public: |
342 | 342 |
|
343 | 343 |
typedef ExtendedListDigraphBase Parent; |
344 | 344 |
|
345 | 345 |
/// Constructor |
346 | 346 |
|
347 | 347 |
/// Constructor. |
348 | 348 |
/// |
349 | 349 |
ListDigraph() {} |
350 | 350 |
|
351 | 351 |
///Add a new node to the digraph. |
352 | 352 |
|
353 | 353 |
///Add a new node to the digraph. |
354 | 354 |
///\return the new node. |
355 | 355 |
Node addNode() { return Parent::addNode(); } |
356 | 356 |
|
357 | 357 |
///Add a new arc to the digraph. |
358 | 358 |
|
359 | 359 |
///Add a new arc to the digraph with source node \c s |
360 | 360 |
///and target node \c t. |
361 | 361 |
///\return the new arc. |
362 | 362 |
Arc addArc(const Node& s, const Node& t) { |
363 | 363 |
return Parent::addArc(s, t); |
364 | 364 |
} |
365 | 365 |
|
366 |
///\brief Erase a node from the digraph. |
|
367 |
/// |
|
368 |
///Erase a node from the digraph. |
|
369 |
/// |
|
370 |
void erase(const Node& n) { Parent::erase(n); } |
|
371 |
|
|
372 |
///\brief Erase an arc from the digraph. |
|
373 |
/// |
|
374 |
///Erase an arc from the digraph. |
|
375 |
/// |
|
376 |
void erase(const Arc& a) { Parent::erase(a); } |
|
377 |
|
|
366 | 378 |
/// Node validity check |
367 | 379 |
|
368 | 380 |
/// This function gives back true if the given node is valid, |
369 | 381 |
/// ie. it is a real node of the graph. |
370 | 382 |
/// |
371 | 383 |
/// \warning A Node pointing to a removed item |
372 | 384 |
/// could become valid again later if new nodes are |
373 | 385 |
/// added to the graph. |
374 | 386 |
bool valid(Node n) const { return Parent::valid(n); } |
375 | 387 |
|
376 | 388 |
/// Arc validity check |
377 | 389 |
|
378 | 390 |
/// This function gives back true if the given arc is valid, |
379 | 391 |
/// ie. it is a real arc of the graph. |
380 | 392 |
/// |
381 | 393 |
/// \warning An Arc pointing to a removed item |
382 | 394 |
/// could become valid again later if new nodes are |
383 | 395 |
/// added to the graph. |
384 | 396 |
bool valid(Arc a) const { return Parent::valid(a); } |
385 | 397 |
|
386 | 398 |
/// Change the target of \c e to \c n |
387 | 399 |
|
388 | 400 |
/// Change the target of \c e to \c n |
389 | 401 |
/// |
390 | 402 |
///\note The <tt>ArcIt</tt>s and <tt>OutArcIt</tt>s referencing |
391 | 403 |
///the changed arc remain valid. However <tt>InArcIt</tt>s are |
392 | 404 |
///invalidated. |
393 | 405 |
/// |
394 | 406 |
///\warning This functionality cannot be used together with the Snapshot |
395 | 407 |
///feature. |
396 | 408 |
void changeTarget(Arc e, Node n) { |
397 | 409 |
Parent::changeTarget(e,n); |
... | ... |
@@ -1178,64 +1190,76 @@ |
1178 | 1190 |
ListGraph(const ListGraph &) :ExtendedListGraphBase() {}; |
1179 | 1191 |
///\brief Assignment of ListGraph to another one is \e not allowed. |
1180 | 1192 |
///Use copyGraph() instead. |
1181 | 1193 |
|
1182 | 1194 |
///Assignment of ListGraph to another one is \e not allowed. |
1183 | 1195 |
///Use copyGraph() instead. |
1184 | 1196 |
void operator=(const ListGraph &) {} |
1185 | 1197 |
public: |
1186 | 1198 |
/// Constructor |
1187 | 1199 |
|
1188 | 1200 |
/// Constructor. |
1189 | 1201 |
/// |
1190 | 1202 |
ListGraph() {} |
1191 | 1203 |
|
1192 | 1204 |
typedef ExtendedListGraphBase Parent; |
1193 | 1205 |
|
1194 | 1206 |
typedef Parent::OutArcIt IncEdgeIt; |
1195 | 1207 |
|
1196 | 1208 |
/// \brief Add a new node to the graph. |
1197 | 1209 |
/// |
1198 | 1210 |
/// Add a new node to the graph. |
1199 | 1211 |
/// \return the new node. |
1200 | 1212 |
Node addNode() { return Parent::addNode(); } |
1201 | 1213 |
|
1202 | 1214 |
/// \brief Add a new edge to the graph. |
1203 | 1215 |
/// |
1204 | 1216 |
/// Add a new edge to the graph with source node \c s |
1205 | 1217 |
/// and target node \c t. |
1206 | 1218 |
/// \return the new edge. |
1207 | 1219 |
Edge addEdge(const Node& s, const Node& t) { |
1208 | 1220 |
return Parent::addEdge(s, t); |
1209 | 1221 |
} |
1222 |
|
|
1223 |
/// \brief Erase a node from the graph. |
|
1224 |
/// |
|
1225 |
/// Erase a node from the graph. |
|
1226 |
/// |
|
1227 |
void erase(const Node& n) { Parent::erase(n); } |
|
1228 |
|
|
1229 |
/// \brief Erase an edge from the graph. |
|
1230 |
/// |
|
1231 |
/// Erase an edge from the graph. |
|
1232 |
/// |
|
1233 |
void erase(const Edge& e) { Parent::erase(e); } |
|
1210 | 1234 |
/// Node validity check |
1211 | 1235 |
|
1212 | 1236 |
/// This function gives back true if the given node is valid, |
1213 | 1237 |
/// ie. it is a real node of the graph. |
1214 | 1238 |
/// |
1215 | 1239 |
/// \warning A Node pointing to a removed item |
1216 | 1240 |
/// could become valid again later if new nodes are |
1217 | 1241 |
/// added to the graph. |
1218 | 1242 |
bool valid(Node n) const { return Parent::valid(n); } |
1219 | 1243 |
/// Arc validity check |
1220 | 1244 |
|
1221 | 1245 |
/// This function gives back true if the given arc is valid, |
1222 | 1246 |
/// ie. it is a real arc of the graph. |
1223 | 1247 |
/// |
1224 | 1248 |
/// \warning An Arc pointing to a removed item |
1225 | 1249 |
/// could become valid again later if new edges are |
1226 | 1250 |
/// added to the graph. |
1227 | 1251 |
bool valid(Arc a) const { return Parent::valid(a); } |
1228 | 1252 |
/// Edge validity check |
1229 | 1253 |
|
1230 | 1254 |
/// This function gives back true if the given edge is valid, |
1231 | 1255 |
/// ie. it is a real arc of the graph. |
1232 | 1256 |
/// |
1233 | 1257 |
/// \warning A Edge pointing to a removed item |
1234 | 1258 |
/// could become valid again later if new edges are |
1235 | 1259 |
/// added to the graph. |
1236 | 1260 |
bool valid(Edge e) const { return Parent::valid(e); } |
1237 | 1261 |
/// \brief Change the source of \c e to \c n |
1238 | 1262 |
/// |
1239 | 1263 |
/// This function changes the source of \c e to \c n. |
1240 | 1264 |
/// |
1241 | 1265 |
///\note The <tt>ArcIt</tt>s and <tt>InArcIt</tt>s |
0 comments (0 inline)