|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xistrat.math.GraphTopology
public class GraphTopology
here general tools for dealing with graphs can be found (is topology the correct name? or better geometry?)
Field Summary | |
---|---|
static int |
NOTSET
|
Constructor Summary | |
---|---|
GraphTopology()
|
Method Summary | |
---|---|
static boolean |
areEqual(int[] a,
int[] b,
int poly)
are those 2 faces about the same face? |
static int |
distanceInEdges(int location,
int last,
int next,
FaceData faceData)
we assume (in order to save time) that (location,last) and (next, location) exist |
static int |
gcd(int a,
int b)
Euclid's algorithm |
static int[] |
getConnectingEdge(int center,
int faceA,
FaceData faceData)
it is actually not assumed that the result is uniquely determined, but at least the 2 polygons have got the same orientation and are connected |
static int[] |
getCorrespondingEdge(int a,
int b,
FastFace fastFace)
it is already assumed that the points are connected! |
static int |
getDistance(FigurData theFig,
int target,
FastFace fastFace,
FigurData[] _figures,
int index)
|
static int[] |
getNeighbours(int k,
FaceData faceData)
|
static int[] |
getNeighbours(int k,
FaceData faceData,
boolean onlyStart)
get neighbours (without using an edge iterator) neisF[k][0] will not necessarily go over an edge with the points face[0][k], face[1][k] (we could change the order of loops below to achieve this, but instead we prefer knowing for sure that neisF[k][0] is always not pointing to a hole) |
static boolean |
haveSameOrientation(int center,
int faceA,
FaceData faceData)
|
static boolean |
isConnnectedVia(int n,
int i,
FaceData faceData)
is face i connected via edge n, (n+1)%poly to another face, or is this a boundary edge? |
static boolean |
isNei(int loca,
int locb,
FastFace fastFace)
are those two faces neighboured |
static boolean |
isNei(int i,
java.util.LinkedList<java.lang.Integer> help,
FastFace fastFace)
used for morphing stuff |
static boolean |
isNeighbourHood(int k,
int i,
FaceData faceData)
are those 2 faces having at least one edge in common? |
static boolean |
isNeighbourHood(int k,
int i,
FastFace fastFace)
are those 2 faces having at least one edge in common? |
static boolean |
notContAlready(java.util.LinkedList<java.util.LinkedList<java.lang.Integer>> current,
java.util.LinkedList<java.lang.Integer> help)
for morphing lists have to be sorted |
static boolean |
notMember(int i,
java.util.LinkedList<java.lang.Integer> help)
used for morphing |
static boolean |
shareVertex(int a,
int b,
FaceData faceData)
do those 2 faces share common vertex? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NOTSET
Constructor Detail |
---|
public GraphTopology()
Method Detail |
---|
public static boolean areEqual(int[] a, int[] b, int poly)
public static boolean shareVertex(int a, int b, FaceData faceData)
public static boolean isConnnectedVia(int n, int i, FaceData faceData)
assumes that the faces are already properly oriented
public static int[] getCorrespondingEdge(int a, int b, FastFace fastFace)
supposed to be the inverse of getConnectingEdge()
a
- is in [0, .., _vertices-1]b
- is in [0, .., _vertices-1]fastFace
-
public static int[] getConnectingEdge(int center, int faceA, FaceData faceData)
center
- is within [0, .. polygons-1] (invalid incl.)faceA
- is within [0, .. polygons-1] (invalid incl.)faceData
-
public static boolean haveSameOrientation(int center, int faceA, FaceData faceData)
center
- 2 faces what are proved to be connected (possibly over more than 1 edge...)public static int distanceInEdges(int location, int last, int next, FaceData faceData)
public static int getDistance(FigurData theFig, int target, FastFace fastFace, FigurData[] _figures, int index)
target
- valid face within [0, .. faces-1]
breadth - first search
ChessEngine
,
ExportData
public static boolean notContAlready(java.util.LinkedList<java.util.LinkedList<java.lang.Integer>> current, java.util.LinkedList<java.lang.Integer> help)
lists have to be sorted
current
- a LinkedList of LinkedLists of Integershelp
- a LinkedList of Integerspublic static boolean notMember(int i, java.util.LinkedList<java.lang.Integer> help)
public static boolean isNei(int i, java.util.LinkedList<java.lang.Integer> help, FastFace fastFace)
public static boolean isNeighbourHood(int k, int i, FastFace fastFace)
public static boolean isNeighbourHood(int k, int i, FaceData faceData)
public static int[] getNeighbours(int k, FaceData faceData)
public static int[] getNeighbours(int k, FaceData faceData, boolean onlyStart)
neisF[k][0] will not necessarily go over an edge with the points face[0][k], face[1][k] (we could change the order of loops below to achieve this, but instead we prefer knowing for sure that neisF[k][0] is always not pointing to a hole)
k
- within [0, .., polygons-1]onlyStart
- if only the first neighbour is needed, for example as used in FastFace.buildNeis() because the other info is redone there again anyway
public static boolean isNei(int loca, int locb, FastFace fastFace)
public static int gcd(int a, int b)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |