Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
cb8f4fc5
Commit
cb8f4fc5
authored
Sep 05, 2012
by
Basile Sauvage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diag de Voronoi centroidaux : ajout de l'accumulation des distances
parent
c9120b7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
include/Algo/Geometry/voronoiDiagrams.h
include/Algo/Geometry/voronoiDiagrams.h
+3
-0
include/Algo/Geometry/voronoiDiagrams.hpp
include/Algo/Geometry/voronoiDiagrams.hpp
+20
-0
No files found.
include/Algo/Geometry/voronoiDiagrams.h
View file @
cb8f4fc5
...
...
@@ -73,9 +73,12 @@ public :
CentroidalVoronoiDiagram
(
typename
PFP
::
MAP
&
m
,
const
EdgeAttribute
<
REAL
>&
c
,
VertexAttribute
<
unsigned
int
>&
r
,
VertexAttribute
<
REAL
>&
d
,
VertexAttribute
<
Dart
>&
o
);
~
CentroidalVoronoiDiagram
();
void
cumulateDistancesOnPaths
();
protected
:
void
clear
();
void
collectVertexFromFront
(
Dart
e
);
void
cumulateDistancesFromSeed
(
Dart
e
);
};
...
...
include/Algo/Geometry/voronoiDiagrams.hpp
View file @
cb8f4fc5
...
...
@@ -168,6 +168,26 @@ void CentroidalVoronoiDiagram<PFP>::collectVertexFromFront(Dart e){
VoronoiDiagram
<
PFP
>::
collectVertexFromFront
(
e
);
}
template
<
typename
PFP
>
void
CentroidalVoronoiDiagram
<
PFP
>::
cumulateDistancesOnPaths
(){
for
(
unsigned
int
i
=
0
;
i
<
this
->
seeds
.
size
();
i
++
)
{
cumulateDistancesFromSeed
(
this
->
seeds
[
i
]);
}
}
template
<
typename
PFP
>
void
CentroidalVoronoiDiagram
<
PFP
>::
cumulateDistancesFromSeed
(
Dart
e
){
Traversor2VVaE
<
typename
PFP
::
MAP
>
tv
(
this
->
map
,
e
);
for
(
Dart
f
=
tv
.
begin
();
f
!=
tv
.
end
();
f
=
tv
.
next
())
{
if
(
pathOrigins
[
f
]
==
this
->
map
.
phi2
(
f
))
{
cumulateDistancesFromSeed
(
f
);
distances
[
e
]
+=
distances
[
f
];
}
}
}
}
// end namespace Geometry
}
// end namespace Algo
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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