192 /// |
192 /// |
193 /// Resize the graph. The function will fully destroy and build the graph. |
193 /// Resize the graph. The function will fully destroy and build the graph. |
194 /// This cause that the maps of the graph will reallocated |
194 /// This cause that the maps of the graph will reallocated |
195 /// automatically and the previous values will be lost. |
195 /// automatically and the previous values will be lost. |
196 void resize(int n) { |
196 void resize(int n) { |
197 Parent::getNotifier(Edge()).clear(); |
197 Parent::notifier(Edge()).clear(); |
198 Parent::getNotifier(Node()).clear(); |
198 Parent::notifier(Node()).clear(); |
199 construct(n); |
199 construct(n); |
200 Parent::getNotifier(Node()).build(); |
200 Parent::notifier(Node()).build(); |
201 Parent::getNotifier(Edge()).build(); |
201 Parent::notifier(Edge()).build(); |
202 } |
202 } |
203 |
203 |
204 /// \brief Returns the node with the given index. |
204 /// \brief Returns the node with the given index. |
205 /// |
205 /// |
206 /// Returns the node with the given index. Because it is a |
206 /// Returns the node with the given index. Because it is a |
404 /// |
404 /// |
405 /// Resize the graph. The function will fully destroy and build the graph. |
405 /// Resize the graph. The function will fully destroy and build the graph. |
406 /// This cause that the maps of the graph will reallocated |
406 /// This cause that the maps of the graph will reallocated |
407 /// automatically and the previous values will be lost. |
407 /// automatically and the previous values will be lost. |
408 void resize(int n) { |
408 void resize(int n) { |
409 Parent::getNotifier(Edge()).clear(); |
409 Parent::notifier(Edge()).clear(); |
410 Parent::getNotifier(UEdge()).clear(); |
410 Parent::notifier(UEdge()).clear(); |
411 Parent::getNotifier(Node()).clear(); |
411 Parent::notifier(Node()).clear(); |
412 construct(n); |
412 construct(n); |
413 Parent::getNotifier(Node()).build(); |
413 Parent::notifier(Node()).build(); |
414 Parent::getNotifier(UEdge()).build(); |
414 Parent::notifier(UEdge()).build(); |
415 Parent::getNotifier(Edge()).build(); |
415 Parent::notifier(Edge()).build(); |
416 } |
416 } |
417 |
417 |
418 /// \brief Returns the node with the given index. |
418 /// \brief Returns the node with the given index. |
419 /// |
419 /// |
420 /// Returns the node with the given index. Because it is a |
420 /// Returns the node with the given index. Because it is a |
701 |
701 |
702 /// \brief Resize the graph |
702 /// \brief Resize the graph |
703 /// |
703 /// |
704 /// Resize the graph |
704 /// Resize the graph |
705 void resize(int n, int m) { |
705 void resize(int n, int m) { |
706 Parent::getNotifier(Edge()).clear(); |
706 Parent::notifier(Edge()).clear(); |
707 Parent::getNotifier(UEdge()).clear(); |
707 Parent::notifier(UEdge()).clear(); |
708 Parent::getNotifier(Node()).clear(); |
708 Parent::notifier(Node()).clear(); |
709 Parent::getNotifier(ANode()).clear(); |
709 Parent::notifier(ANode()).clear(); |
710 Parent::getNotifier(BNode()).clear(); |
710 Parent::notifier(BNode()).clear(); |
711 construct(n, m); |
711 construct(n, m); |
712 Parent::getNotifier(ANode()).build(); |
712 Parent::notifier(ANode()).build(); |
713 Parent::getNotifier(BNode()).build(); |
713 Parent::notifier(BNode()).build(); |
714 Parent::getNotifier(Node()).build(); |
714 Parent::notifier(Node()).build(); |
715 Parent::getNotifier(UEdge()).build(); |
715 Parent::notifier(UEdge()).build(); |
716 Parent::getNotifier(Edge()).build(); |
716 Parent::notifier(Edge()).build(); |
717 } |
717 } |
718 |
718 |
719 /// \brief Number of nodes. |
719 /// \brief Number of nodes. |
720 int nodeNum() const { return Parent::nodeNum(); } |
720 int nodeNum() const { return Parent::nodeNum(); } |
721 /// \brief Number of A-nodes. |
721 /// \brief Number of A-nodes. |