Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
29283d40
Commit
29283d40
authored
Nov 13, 2016
by
Benedikt Zoennchen
Browse files
add adpative triangulation implementation
parent
b4b66b81
Changes
1
Hide whitespace changes
Inline
Side-by-side
VadereUtils/src/org/vadere/util/delaunay/BowyerWatson.java
View file @
29283d40
package
org.vadere.util.delaunay
;
import
org.apache.commons.lang3.tuple.ImmutablePair
;
import
org.apache.commons.lang3.tuple.ImmutableTriple
;
import
org.apache.commons.lang3.tuple.Pair
;
import
org.apache.commons.lang3.tuple.Triple
;
import
org.vadere.util.geometry.LinkedCellsGrid
;
import
org.vadere.util.geometry.shapes.VCircle
;
import
org.vadere.util.geometry.shapes.VLine
;
import
org.vadere.util.geometry.shapes.VPoint
;
...
...
@@ -80,8 +77,6 @@ public class BowyerWatson<P extends VPoint> {
private
void
handle
(
final
P
point
)
{
HashSet
<
Line
>
edges
=
new
HashSet
<>();
// This is way to expensive O(n) instead of O(log(n))
Map
<
Boolean
,
List
<
Triple
<
P
,
P
,
P
>>>
partition
=
triangles
.
parallelStream
().
collect
(
Collectors
.
partitioningBy
(
t
->
pointsToTriangle
(
t
).
isInCircumscribedCycle
(
point
)));
List
<
Triple
<
P
,
P
,
P
>>
badTriangles
=
partition
.
get
(
true
);
...
...
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