All Packages Class Hierarchy This Package Previous Next Index
Class CH.rubin.matching.Graph3DM
java.lang.Object
|
+----CH.rubin.matching.Graph3DM
- public class Graph3DM
- extends Object
- implements Cloneable
Class containing a three dimensional matching.
- Version:
- $Revision: 2.4 $
- Author:
- Patrick Feisthammel email: pafei@rubin.ch
-
Graph3DM(Graph3DM)
- Constructs a graph which is a shallow copy of an existing Graph3DM
-
Graph3DM(int)
- Constructs an empty graph which can become a tripartite matching graph by adding
edges with setTripleXYZ(x,y,z)
-
canTripleBeSet(int[])
- Test if the triplet may be added to the graph without violating
the matching.
-
canTripleXYZBeSet(int, int, int)
- Test if the triplet (x,y,z) may be added to the graph without violating
the matching.
-
clone(Object)
- returns a shallow copy of itself
-
existsTripleXYZ(int, int, int)
- checks if the triplets (x,y,z) is within this graph.
-
points()
- returns the points per dimension in this graph.
-
setTriple(int[])
- Sets a triplet in the graph.
-
setTripleXYZ(int, int, int)
- Sets the triplets (x,y,z) in the graph.
-
toString()
- String representation of the tripartite matching.
-
tripletList()
- returns all triplets in the graph as a two dimensional list.
-
triplets()
- returns the the number of triplets in the graph.
-
TrySettingTriple(int[])
- Tries to sets a triplet in the graph.
Graph3DM
public Graph3DM(int points)
- Constructs an empty graph which can become a tripartite matching graph by adding
edges with setTripleXYZ(x,y,z)
- Parameters:
- points - how many points per dimension
Graph3DM
public Graph3DM(Graph3DM graph)
- Constructs a graph which is a shallow copy of an existing Graph3DM
- Parameters:
- graph - the Graph3DM to copy
clone
public Object clone(Object graph)
- returns a shallow copy of itself
- Parameters:
- graph - the Graph3DM to copy
points
public int points()
- returns the points per dimension in this graph.
triplets
public int triplets()
- returns the the number of triplets in the graph.
Needs points() steps to count them.
- Returns:
- number of triplets in the graph
- See Also:
- points, tripletList
tripletList
public int[][] tripletList()
- returns all triplets in the graph as a two dimensional list. Not connected points are -1
- Returns:
- tripletList index is x; y==tripletList[x][0], z==tripletList[x][1]; 0<=x<=points()
- See Also:
- points, triplets
existsTripleXYZ
public boolean existsTripleXYZ(int x,
int y,
int z)
- checks if the triplets (x,y,z) is within this graph.
- Parameters:
- x - the x coordinat of the triple, 0<= x <= points()
- y - the y coordinat of the triple, 0<= y <= points()
- z - the z coordinat of the triple, 0<= z <= points()
- See Also:
- points
canTripleBeSet
public boolean canTripleBeSet(int triplet[])
- Test if the triplet may be added to the graph without violating
the matching. E.g. no point has two outgoing edges after that
- Parameters:
- triplet - an array int[3] with x == triplet[0], y == triplet[1] and z == triplet[2].
0<= x, y, z <= points()
- See Also:
- points, canTripletXYZBeSet, trySettingTriple
canTripleXYZBeSet
public boolean canTripleXYZBeSet(int x,
int y,
int z)
- Test if the triplet (x,y,z) may be added to the graph without violating
the matching. E.g. no point has two outgoing edges after that
- Parameters:
- x - the x coordinat of the triple, 0<= x <= points()
- y - the y coordinat of the triple, 0<= y <= points()
- z - the z coordinat of the triple, 0<= z <= points()
- See Also:
- points, canTripletBeSet, trySettingTriple
setTriple
public void setTriple(int triplet[])
- Sets a triplet in the graph. If the triplet can not be set, because this would
violate the matching, an exception is thrown.
- Parameters:
- triplet - an array int[3] with x == triplet[0], y == triplet[1] and z == triplet[2].
0<= x, y, z <= points()
- See Also:
- points, canTripleBeSet, setTripletXYZ, trySettingTriple
TrySettingTriple
public boolean TrySettingTriple(int triplet[])
- Tries to sets a triplet in the graph. If the triplet can not be set, because
this would violate the matching, return false, else return true.
- Parameters:
- triplet - an array int[3] with x == triplet[0], y == triplet[1] and z == triplet[2].
0<= x, y, z <= points()
- See Also:
- points, canTripleBeSet, setTripletXYZ
setTripleXYZ
public void setTripleXYZ(int x,
int y,
int z)
- Sets the triplets (x,y,z) in the graph. If the triplet can not be set, because this would
violate the matching, an exception is thrown.
- Parameters:
- x - the x coordinat of the triple, 0<= x <= points()
- y - the y coordinat of the triple, 0<= y <= points()
- z - the z coordinat of the triple, 0<= z <= points()
- See Also:
- points, canTripleXYZBeSet, setTriple
toString
public String toString()
- String representation of the tripartite matching.
For every triple, the x, y and z coordinate is printed out
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index