![]() |
Tulip
4.6.0
Better Visualization Through Research
|
00001 /* 00002 * 00003 * This file is part of Tulip (www.tulip-software.org) 00004 * 00005 * Authors: David Auber and the Tulip development Team 00006 * from LaBRI, University of Bordeaux 00007 * 00008 * Tulip is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation, either version 3 00011 * of the License, or (at your option) any later version. 00012 * 00013 * Tulip is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 * See the GNU General Public License for more details. 00017 * 00018 */ 00019 ///@cond DOXYGEN_HIDDEN 00020 00021 #ifndef ORDERING_H 00022 #define ORDERING_H 00023 #include <tulip/Face.h> 00024 //#include <tulip/PlanarConMap.h> 00025 #include <tulip/Node.h> 00026 #include <tulip/Edge.h> 00027 //#include <vector> 00028 //#include <map> 00029 00030 #include <tulip/MutableContainer.h> 00031 00032 #ifndef DOXYGEN_NOTFOR_USER 00033 00034 namespace tlp { 00035 class PluginProgress; 00036 class PlanarConMap; 00037 00038 class TLP_SCOPE Ordering { 00039 public : 00040 00041 typedef struct FaceAndPos_ { 00042 Face face; 00043 node n_first; 00044 node n_last; 00045 } FaceAndPos; 00046 00047 std::vector<edge> getDummyEdges() { 00048 return dummy_edge; 00049 } 00050 00051 Ordering(PlanarConMap * G, PluginProgress* pluginProgress = 0, 00052 int minProgress = 0, int deltaProgress = 0, int maxProgress = 0); 00053 ~Ordering(); 00054 // inline void push_back(std::vector<node> nodeVector) { 00055 inline size_t size() { 00056 return _data.size(); 00057 } 00058 inline std::vector<node> operator[](const unsigned int i) const { 00059 return _data[i]; 00060 } 00061 inline std::vector<node>& operator[](const unsigned int i) { 00062 return _data[i]; 00063 } 00064 00065 private : 00066 std::vector<std::vector<node> > _data; 00067 PlanarConMap * Gp; 00068 MutableContainer<int> oute; 00069 MutableContainer<int> outv; 00070 MutableContainer<bool> visitedNodes; 00071 MutableContainer<bool> visitedFaces; 00072 MutableContainer<bool> markedFaces; 00073 MutableContainer<int> seqP; 00074 MutableContainer<bool> isOuterFace; 00075 MutableContainer<bool> contour; 00076 MutableContainer<bool> is_selectable; 00077 MutableContainer<bool> is_selectable_visited; 00078 MutableContainer<bool> is_selectable_face; 00079 MutableContainer<bool> is_selectable_visited_face; 00080 MutableContainer<node> left; 00081 MutableContainer<node> right; 00082 bool existMarkedF; 00083 FaceAndPos minMarkedFace ; 00084 Face ext; 00085 std::vector<node> v1; 00086 std::vector<edge> dummy_edge; 00087 00088 node getLastOfQ(Face f, node prec, node n, edge e); 00089 node getLastOfP(Face f, node prec, node n,edge e); 00090 std::vector<node> getPathFrom(std::vector<node> fn, int from); 00091 int infFaceSize(); 00092 00093 void updateOutAndVisitedFaces(Face f); 00094 void updateContourLeftRight(node prec, node n, edge e, node last); 00095 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); 00096 void updateSelectableFaces(std::vector<Face> v_faces); 00097 00098 int seqp(Face f); 00099 void minMarkedf(); 00100 void setMinMarkedFace(Face f); 00101 00102 struct augmentableAndNodes_ getAugAndNodes(Face f); 00103 void augment(Face f, node prec, node n, node prec_last, node last, int nbNewFace, bool pair); 00104 void selectAndUpdate(Face f); 00105 void selectAndUpdate(node n); 00106 bool isSelectable(node n); 00107 00108 void init(); 00109 void init_v1(std::vector<node> fn); 00110 void init_selectableNodes(); 00111 void init_selectableFaces(); 00112 void init_outv_oute(); 00113 void init_seqP(); 00114 void init_outerface(); 00115 00116 }; 00117 00118 } 00119 #endif 00120 #endif 00121 ///@endcond