Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Pitiot
CGoGN
Commits
d0f183b2
Commit
d0f183b2
authored
Oct 28, 2011
by
Pierre Kraemer
Browse files
Traversor1 OK
parent
6087405d
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/Topology/generic/traversor1.h
View file @
d0f183b2
...
...
@@ -39,15 +39,27 @@ private:
Dart
start
;
Dart
current
;
Dart
d2
;
public:
Traversor1VE
(
MAP
&
map
,
Dart
dart
)
:
m
(
map
),
start
(
dart
)
{}
{
d2
=
m
.
phi_1
(
start
)
;
if
(
d2
==
start
)
// 1 edge loop case
d2
=
NIL
;
}
Dart
begin
()
{
current
=
start
;
return
current
;
}
Dart
end
()
{
return
NIL
;
}
Dart
next
()
{
current
=
current
==
start
?
m
.
phi_1
(
start
)
:
NIL
;
if
(
current
!=
NIL
)
{
if
(
current
==
start
)
current
=
d2
;
else
current
=
NIL
;
}
return
current
;
}
}
;
...
...
@@ -60,17 +72,33 @@ private:
Dart
start
;
Dart
current
;
Dart
d2
;
public:
Traversor1VVaE
(
MAP
&
map
,
Dart
dart
)
:
m
(
map
)
{
start
=
m
.
phi_1
(
dart
)
;
if
(
start
==
dart
)
// 1 edge loop case
start
=
NIL
;
else
{
d2
=
m
.
phi1
(
dart
)
;
if
(
d2
==
start
)
// 2 edges loop case
d2
=
NIL
;
}
}
Dart
begin
()
{
current
=
start
;
return
current
;
}
Dart
end
()
{
return
NIL
;
}
Dart
next
()
{
current
=
current
==
start
?
m
.
phi1
(
m
.
phi1
(
start
))
:
NIL
;
if
(
current
!=
NIL
)
{
if
(
current
==
start
)
current
=
d2
;
else
current
=
NIL
;
}
return
current
;
}
}
;
...
...
@@ -84,15 +112,27 @@ private:
Dart
start
;
Dart
current
;
Dart
d2
;
public:
Traversor1EV
(
MAP
&
map
,
Dart
dart
)
:
m
(
map
),
start
(
dart
)
{}
{
d2
=
m
.
phi1
(
start
)
;
if
(
d2
==
start
)
// 1 edge loop case
d2
=
NIL
;
}
Dart
begin
()
{
current
=
start
;
return
current
;
}
Dart
end
()
{
return
NIL
;
}
Dart
next
()
{
current
=
current
==
start
?
m
.
phi1
(
start
)
:
NIL
;
if
(
current
!=
NIL
)
{
if
(
current
==
start
)
current
=
d2
;
else
current
=
NIL
;
}
return
current
;
}
}
;
...
...
@@ -105,17 +145,33 @@ private:
Dart
start
;
Dart
current
;
Dart
d2
;
public:
Traversor1EEaV
(
MAP
&
map
,
Dart
dart
)
:
m
(
map
)
{
start
=
m
.
phi_1
(
dart
)
;
if
(
start
==
dart
)
// 1 edge loop case
start
=
NIL
;
else
{
d2
=
m
.
phi1
(
dart
)
;
if
(
d2
==
start
)
// 2 edges loop case
d2
=
NIL
;
}
}
Dart
begin
()
{
current
=
start
;
return
current
;
}
Dart
end
()
{
return
NIL
;
}
Dart
next
()
{
current
=
current
==
start
?
m
.
phi1
(
m
.
phi1
(
start
))
:
NIL
;
if
(
current
!=
NIL
)
{
if
(
current
==
start
)
current
=
d2
;
else
current
=
NIL
;
}
return
current
;
}
}
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment