Package pointgon
Class MWT
java.lang.Object
pointgon.MWT
- All Implemented Interfaces:
Serializable
,Runnable
Class for the minimum weight triangulation of a pointgon.
- Since:
- 2005.02.18 (Christian Borgelt)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
processing mode: algorithm maskstatic final int
splitter identifier: combined 1static final int
splitter identifier: combined 2protected int
order of the perimeter verticesstatic final int
processing mode: hole distribution flagstatic final int
splitter identifier: greedyprotected Vertex[]
hole vertices (sorted by x-coord.)protected int
processing mode (e.g.static final int
splitter identifier: pathstatic final int
processing mode: precheck flagstatic final int
processing mode: reverse key flagstatic final int
splitter identifier: traingleprotected char[][][]
flag table for valid trianglesprotected Vertex[]
perimeter vertices of pointgonprotected double[][]
table of edge weights -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
getDepth()
Get the maximum depth of the recursion.Edge[]
getEdges()
Get the edges of the best triangulation.Vertex[]
getHoles()
Get the holes of the pointgon.int
getMode()
Get the processing mode.long
Get the number of splits considered.long
Get the number of subproblems visited.long
getTime()
Get the execution time of the search.long
Get the number of triangles of the best triangulation.Vertex[]
Get the perimeter vertices of the pointgon.double
Get the weight of the best triangulation.static void
Main program for command line invocation.void
run()
Run minimum weight triangulation problem solving.void
setMode
(int mode) Set the processing mode.boolean
solve()
Solve minimum weight triangulation problem.void
stop()
Stop the minimum weight triangulation problem solving (abort).toString()
Create a string description of the minimum weight triangulation.
-
Field Details
-
TRIANGLE
public static final int TRIANGLEsplitter identifier: traingle- See Also:
-
PATH
public static final int PATHsplitter identifier: path- See Also:
-
COMB_1
public static final int COMB_1splitter identifier: combined 1- See Also:
-
COMB_2
public static final int COMB_2splitter identifier: combined 2- See Also:
-
GREEDY
public static final int GREEDYsplitter identifier: greedy- See Also:
-
ALGOMASK
public static final int ALGOMASKprocessing mode: algorithm mask- See Also:
-
PRECHECK
public static final int PRECHECKprocessing mode: precheck flag- See Also:
-
DISTHOLES
public static final int DISTHOLESprocessing mode: hole distribution flag- See Also:
-
REVKEY
public static final int REVKEYprocessing mode: reverse key flag- See Also:
-
verts
perimeter vertices of pointgon -
dir
protected int dirorder of the perimeter vertices -
holes
hole vertices (sorted by x-coord.) -
wgts
protected double[][] wgtstable of edge weights -
trtab
protected char[][][] trtabflag table for valid triangles -
mode
protected int modeprocessing mode (e.g. DISTHOLES)
-
-
Constructor Details
-
MWT
Create a minimum weight triangulation solver.- Parameters:
pgon
- the pointgon to triangulate- Since:
- 2005.02.18 (Christian Borgelt)
-
-
Method Details
-
getMode
public int getMode()Get the processing mode.- Returns:
- the processing mode
- Since:
- 2005.02.18 (Christian Borgelt)
-
setMode
public void setMode(int mode) Set the processing mode.- Parameters:
mode
- the processing mode- Since:
- 2005.02.18 (Christian Borgelt)
-
getVertices
Get the perimeter vertices of the pointgon.- Returns:
- the perimeter vertices of the pointgon
- Since:
- 2005.02.18 (Christian Borgelt)
-
getHoles
Get the holes of the pointgon.- Returns:
- the holes of the pointgon
- Since:
- 2005.02.18 (Christian Borgelt)
-
getWeight
public double getWeight()Get the weight of the best triangulation.- Returns:
- the weight of the best triangulation
- Since:
- 2005.02.18 (Christian Borgelt)
-
getEdges
Get the edges of the best triangulation.- Returns:
- the edges of the best triangulation
- Since:
- 2005.02.18 (Christian Borgelt)
-
getTriangles
public long getTriangles()Get the number of triangles of the best triangulation.- Returns:
- the number of triangles of the best triangulation
- Since:
- 2005.02.18 (Christian Borgelt)
-
getSubprobs
public long getSubprobs()Get the number of subproblems visited.- Returns:
- the number of subproblems visited
- Since:
- 2005.02.18 (Christian Borgelt)
-
getSplits
public long getSplits()Get the number of splits considered.- Returns:
- the number of splits considered
- Since:
- 2005.02.18 (Christian Borgelt)
-
getDepth
public long getDepth()Get the maximum depth of the recursion.- Returns:
- the maximum depth of the recursion
- Since:
- 2005.02.18 (Christian Borgelt)
-
getTime
public long getTime()Get the execution time of the search.- Returns:
- the execution time of the search
- Since:
- 2005.02.18 (Christian Borgelt)
-
solve
public boolean solve()Solve minimum weight triangulation problem.- Returns:
- whether a solution was found
- Since:
- 2005.02.18 (Christian Borgelt)
-
run
public void run()Run minimum weight triangulation problem solving. -
stop
public void stop()Stop the minimum weight triangulation problem solving (abort).- Since:
- 2005.02.18 (Christian Borgelt)
-
toString
Create a string description of the minimum weight triangulation. -
main
Main program for command line invocation.- Parameters:
args
- the command line arguments- Since:
- 2005.02.18 (Christian Borgelt)
-