Package pointgon
Class Splitter
java.lang.Object
pointgon.Splitter
- All Implemented Interfaces:
Serializable
Class for splitting a (sub-)pointgon into (sub-)pointgons.
- Since:
- 2006.01.27 (Christian Borgelt)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object
best split of the subproblemprotected int
size of subproblemprotected int
order of perimeter verticesprotected boolean
whether to distribute holesprotected int
number of holes in subproblemprotected Vertex[]
holes in subproblemprotected Vertex[]
key of subproblemprotected int
size of left subproblemprotected int
number of holes in left subproblemprotected Vertex[]
holes in left subproblemprotected Vertex[]
key of left subproblemprotected int
size of right subproblemprotected int
number of holes in right subproblemprotected Vertex[]
holes in right subproblemprotected Vertex[]
key of right subproblemprotected int
state of the splitterprotected Vertex[]
triangle cut out of the subproblemprotected char[][][]
flag table for valid trianglesprotected Vertex[]
all (input) perimeter verticesprotected double[][]
table of edge weights/validity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
Distribute the hole vertices.protected abstract Edge[]
edges()
Get the edges of the current path.protected double
empty()
Check for an empty triangle.protected abstract void
Initialize a subproblem splitter.protected abstract void
Initialize a subproblem splitter.protected boolean
Check intersection with key.protected abstract boolean
next()
Create next subproblem split.protected abstract Object
retrieve()
Retrieve the best path.protected void
show()
Show the subproblem to process.protected void
show
(int depth) Show the subproblem to process.protected abstract void
split()
Split a subproblem with the current split.protected abstract void
store()
Store the current path as best.protected abstract Vertex[]
triangle()
Get the current triangle.protected boolean
Check a triangle.protected abstract double
weight()
Compute the weight of the current split.
-
Field Details
-
verts
all (input) perimeter vertices -
dir
protected int dirorder of perimeter vertices -
wgts
protected double[][] wgtstable of edge weights/validity -
trtab
protected char[][][] trtabflag table for valid triangles -
dist
protected boolean distwhether to distribute holes -
key
key of subproblem -
rgtkey
key of right subproblem -
lftkey
key of left subproblem -
cnt
protected int cntsize of subproblem -
rgtcnt
protected int rgtcntsize of right subproblem -
lftcnt
protected int lftcntsize of left subproblem -
holes
holes in subproblem -
rgtholes
holes in right subproblem -
lftholes
holes in left subproblem -
holecnt
protected int holecntnumber of holes in subproblem -
rgtholecnt
protected int rgtholecntnumber of holes in right subproblem -
lftholecnt
protected int lftholecntnumber of holes in left subproblem -
triangle
triangle cut out of the subproblem -
state
protected int statestate of the splitter -
best
best split of the subproblem
-
-
Constructor Details
-
Splitter
public Splitter()Create a subproblem splitter.- Since:
- 2006.01.27 (Christian Borgelt)
-
-
Method Details
-
valid
Check a triangle.- Parameters:
a
- first vertex of triangleb
- second vertex of trianglec
- third vertex of triangle- Returns:
- whether the triangle is valid
- Since:
- 2006.01.27 (Christian Borgelt)
-
isects
Check intersection with key.- Parameters:
src
- the source vertexdst
- the destination vertex- Returns:
- whether the edges between the vertices intersects path
- Since:
- 2006.01.27 (Christian Borgelt)
-
init
Initialize a subproblem splitter.- Parameters:
key
- the key of the subproblemcnt
- the size of the subproblemholes
- the holes of the subproblemholecnt
- the number of holes of the subproblem- Since:
- 2006.01.27 (Christian Borgelt)
-
init
Initialize a subproblem splitter.- Parameters:
key
- the key of the subproblemcnt
- the size of the subproblemspobj
- the splitter object- Since:
- 2006.01.27 (Christian Borgelt)
-
empty
protected double empty()Check for an empty triangle.- Returns:
- whether the traingle is empty
- Since:
- 2006.01.27 (Christian Borgelt)
-
next
protected abstract boolean next()Create next subproblem split.- Returns:
- whether a new split was created
- Since:
- 2006.01.27 (Christian Borgelt)
-
split
protected abstract void split()Split a subproblem with the current split.- Since:
- 2006.01.27 (Christian Borgelt)
-
triangle
Get the current triangle.- Returns:
- the current triangle
- Since:
- 2006.01.27 (Christian Borgelt)
-
weight
protected abstract double weight()Compute the weight of the current split.- Returns:
- the weight of a split
- Since:
- 2006.01.27 (Christian Borgelt)
-
edges
Get the edges of the current path.- Returns:
- the edges of the current path as an array
- Since:
- 2006.01.27 (Christian Borgelt)
-
store
protected abstract void store()Store the current path as best.- Since:
- 2006.01.27 (Christian Borgelt)
-
retrieve
Retrieve the best path.- Returns:
- the best path
- Since:
- 2006.01.27 (Christian Borgelt)
-
distribute
protected abstract void distribute()Distribute the hole vertices.- Since:
- 2006.01.27 (Christian Borgelt)
-
show
protected void show()Show the subproblem to process.- Since:
- 2006.01.27 (Christian Borgelt)
-
show
protected void show(int depth) Show the subproblem to process.- Parameters:
depth
- the recursion depth- Since:
- 2006.01.27 (Christian Borgelt)
-