package archive; import java.util.*; /** * These are the arrays needed to store graph incidence data for planar graphs. * faceList is a list of faces faceList[0]={v1,v2,v3,..,ngon} firstface * faceList[1]={v'1,...} second face. * * The tempList is a list of face numbers of the faces that are temporary. * * adjacent is a field in the Mathematica.96 format for COMBIN. * it lists the adjacent vertices around vertex i in cyclic order * * vertexList lists the faces around vertex i in cyclic order. * **/ /** format of graph*.java: first group is (1+n) elements, where n is the first element. n = number of temporary faces, followed by the facenumber of each temp. the main group follows next m+f1+f2+...fm m = number of faces total, followed by data fi for each face. fi = (1+li) elements, li is the constant in the first element, it is the number of vertices on the polygon, followed by the vertex numbers of each element. **/ public class GraphArrays { public int faceList[][]; public int adjacent[][]; public int vertexList[][]; public int tempList[]; public GraphArrays() {}; public GraphArrays(String S) { // Call String Tokenizer; StringTokenizer Token = new StringTokenizer(S); int L = Token.countTokens(); int tokarray[] = new int[L]; int i,j; for (i=0;iadjacentCount) adjacentCount = faceList[i][j]; adjacentCount++; adjacent = new int[adjacentCount][]; vertexList = new int[adjacentCount][]; int adjacentSizes[] = new int[adjacentCount]; for (i=0;i