39 typedef std::deque<int> mgTL2deqIndex;
43 mgTL2deqIndex m_indices;
44 std::vector<int> m_used_edges;
52 typedef mgTL2deqIndex::reverse_iterator
ritr;
53 typedef std::vector<int>::iterator
EUitr;
54 typedef std::vector<int>::const_iterator
CEUitr;
62 mgTL2Fan(
int v1,
int v2):m_used(false),m_indices(2){m_indices[0]=v1;m_indices[1]=v2;};
63 mgTL2Fan(mgTL2deqIndex& index):m_used(false),m_indices(index){;};
70 int back()
const{
return m_indices.back();};
71 IndexItr
begin(){
return m_indices.begin();};
72 CIndexItr
begin()
const{
return m_indices.begin();};
77 IndexItr
end(){
return m_indices.end();};
78 CIndexItr
end()
const{
return m_indices.end();};
79 void erase(IndexItr iter){m_indices.erase(iter);};
82 CIndexItr
find(
int index)
const{
83 return std::find(m_indices.begin(), m_indices.end(), index);
87 return std::find(m_indices.begin(), m_indices.end(), index);
93 int front()
const{
return m_indices.front();};
96 IndexItr
insert(IndexItr iter,
int index){
97 return m_indices.insert(iter, index);
100 const mgTL2deqIndex&
indices()
const{
return m_indices;};
109 ritr
rbegin(){
return m_indices.rbegin();};
110 ritr
rend(){
return m_indices.rend();};
118 int size()
const{
return (
int)m_indices.size();};
mgTL2Fan(mgTL2deqIndex &index)
Definition: TL2Fan.h:63
int back() const
Definition: TL2Fan.h:70
mgTL2Fan(int v1)
Definition: TL2Fan.h:61
mgTL2deqIndex::iterator IndexItr
Definition: TL2Fan.h:50
int size() const
Definition: TL2Fan.h:118
std::vector< int >::iterator EUitr
Edge Used iterator.
Definition: TL2Fan.h:53
CIndexItr end() const
Definition: TL2Fan.h:78
void push_back(int index)
Definition: TL2Fan.h:101
std::vector< int >::const_iterator CEUitr
Edge Used iterator.
Definition: TL2Fan.h:54
mgTL2Fan()
Definition: TL2Fan.h:60
void push_front(int index)
Definition: TL2Fan.h:102
int operator[](int i) const
Definition: TL2Fan.h:66
void set_edge_used(int j)
Set the edge(i,j) as used where i is the index of this fan's vertex.
void print_indices(std::ostream &out) const
Print out indices as "|n0,n1,....
void set_vertex_used()
Set this vertex as used.
Definition: TL2Fan.h:113
mgTL2deqIndex::const_iterator CIndexItr
Definition: TL2Fan.h:51
IndexItr begin()
Definition: TL2Fan.h:71
mgTL2Fan is a point list to constitue a fan.
Definition: TL2Fan.h:38
void erase(IndexItr iter)
Definition: TL2Fan.h:79
ritr rend()
Definition: TL2Fan.h:110
mgTL2deqIndex::reverse_iterator ritr
Definition: TL2Fan.h:52
int front() const
Definition: TL2Fan.h:93
void pop_front()
Definition: TL2Fan.h:104
CIndexItr begin() const
Definition: TL2Fan.h:72
void pop_back()
Definition: TL2Fan.h:103
IndexItr insert(IndexItr iter, int index)
Insert the index before the position iter.
Definition: TL2Fan.h:96
bool vertex_is_used() const
Definition: TL2Fan.h:120
IndexItr find_aft(int index)
頂点周辺の頂点リストからindexを検索する(後ろから検索)
mgTL2Fan(int v1, int v2)
Definition: TL2Fan.h:62
ritr rbegin()
Definition: TL2Fan.h:109
const mgTL2deqIndex & indices() const
Definition: TL2Fan.h:100
bool edge_is_used(int j) const
Test if the edge(i,j) is used or not where i is the index of this edge.
IndexItr find(int index)
頂点周辺の頂点リストからindexを検索する(前から検索)
Definition: TL2Fan.h:86
friend std::ostream & operator<<(std::ostream &out, const mgTL2Fan &fan)
CIndexItr find(int index) const
頂点周辺の頂点リストからindexを検索する(前から検索)
Definition: TL2Fan.h:82
IndexItr end()
Definition: TL2Fan.h:77