equal
deleted
inserted
replaced
356 Node t=target(e); |
356 Node t=target(e); |
357 _changeTarget(e,source(e)); |
357 _changeTarget(e,source(e)); |
358 _changeSource(e,t); |
358 _changeSource(e,t); |
359 } |
359 } |
360 |
360 |
361 ///Using this it is possible to avoid the superfluous memory allocation. |
361 ///Using this it is possible to avoid the superfluous memory |
362 |
362 ///allocation. |
363 ///Using this it is possible to avoid the superfluous memory allocation. |
363 |
364 ///\todo more docs... |
364 ///Using this it is possible to avoid the superfluous memory |
|
365 ///allocation: if you know that the graph you want to build will |
|
366 ///contain at least 10 million nodes then it is worth to reserve |
|
367 ///space for this amount before starting to build the graph. |
|
368 void reserveNode(int n) { nodes.reserve(n); }; |
|
369 |
|
370 ///Using this it is possible to avoid the superfluous memory |
|
371 ///allocation. |
|
372 |
|
373 ///Using this it is possible to avoid the superfluous memory |
|
374 ///allocation: see the \ref reserveNode function. |
365 void reserveEdge(int n) { edges.reserve(n); }; |
375 void reserveEdge(int n) { edges.reserve(n); }; |
|
376 |
366 |
377 |
367 ///Contract two nodes. |
378 ///Contract two nodes. |
368 |
379 |
369 ///This function contracts two nodes. |
380 ///This function contracts two nodes. |
370 /// |
381 /// |