24 #include <tulip/Face.h>
25 #include <tulip/PlanarConMap.h>
26 #include <tulip/Node.h>
30 #include <tulip/MutableContainer.h>
32 #ifndef DOXYGEN_NOTFOR_USER
36 class TLP_SCOPE Ordering {
39 typedef struct FaceAndPos_ {
45 std::vector<edge> getDummyEdges() {
49 Ordering(PlanarConMap * G, PluginProgress* pluginProgress = 0,
50 int minProgress = 0,
int deltaProgress = 0,
int maxProgress = 0);
53 inline size_t size() {
56 inline std::vector<node> operator[](
const unsigned int i)
const {
59 inline std::vector<node>& operator[](
const unsigned int i) {
64 std::vector<std::vector<node> > _data;
66 MutableContainer<int> oute;
67 MutableContainer<int> outv;
68 MutableContainer<bool> visitedNodes;
69 MutableContainer<bool> visitedFaces;
70 MutableContainer<bool> markedFaces;
71 MutableContainer<int> seqP;
72 MutableContainer<bool> isOuterFace;
73 MutableContainer<bool> contour;
74 MutableContainer<bool> is_selectable;
75 MutableContainer<bool> is_selectable_visited;
76 MutableContainer<bool> is_selectable_face;
77 MutableContainer<bool> is_selectable_visited_face;
78 MutableContainer<node> left;
79 MutableContainer<node> right;
81 FaceAndPos minMarkedFace ;
84 std::vector<edge> dummy_edge;
86 node getLastOfQ(Face f, node prec, node n, edge e);
87 node getLastOfP(Face f, node prec, node n,edge e);
88 std::vector<node> getPathFrom(std::vector<node> fn,
int from);
91 void updateOutAndVisitedFaces(Face f);
92 void updateContourLeftRight(node prec, node n, edge e, node last);
93 void updateNewSelectableNodes(node node_f, node no_tmp2,edge ed_tmp, node node_last,std::vector<Face> v_faces,
bool one_face =
false,
bool was_visited =
false,
bool selection_face =
false);
94 void updateSelectableFaces(std::vector<Face> v_faces);
98 void setMinMarkedFace(Face f);
100 struct augmentableAndNodes_ getAugAndNodes(Face f);
101 void augment(Face f, node prec, node n, node prec_last, node last,
int nbNewFace,
bool pair);
102 void selectAndUpdate(Face f);
103 void selectAndUpdate(node n);
104 bool isSelectable(node n);
107 void init_v1(std::vector<node> fn);
108 void init_selectableNodes();
109 void init_selectableFaces();
110 void init_outv_oute();
112 void init_outerface();