edu.stanford.math.plex
public class Packed8Simplex extends Simplex
The Packed8Simplex
class implements the abstract class
Simplex
for Simplices of dimension 6-7 by storing the
vertices as 8 packed positive integer values in three long
integers. This limits us to H6 calculations with this representation,
but it seems very unlikely that we can go even this far an alteration of
the basic algorithm.
Modifier and Type | Field and Description |
---|---|
long |
bits_hi |
long |
bits_hi_mid |
long |
bits_lo |
long |
bits_lo_mid |
protected static long |
DIM_6_MASK |
protected static int |
MAX_8_INDEX |
protected static int |
VERTEX_BIT_SZ |
Modifier | Constructor and Description |
---|---|
protected |
Packed8Simplex() |
protected |
Packed8Simplex(int v1,
int v2,
int v3,
int v4,
int v5,
int v6,
int v7) |
protected |
Packed8Simplex(int v1,
int v2,
int v3,
int v4,
int v5,
int v6,
int v7,
int v8) |
protected |
Packed8Simplex(long bits_lo_val,
long bits_lo_mid_val,
long bits_hi_mid_val,
long bits_hi_val) |
Modifier and Type | Method and Description |
---|---|
protected static void |
assert_8_vertices(int[] v) |
Simplex[] |
boundaryArray()
Returns the boundary of self.
|
protected static boolean |
check_8_vertices(int[] v) |
protected int |
compareTo(Packed8Simplex s) |
int |
compareTo(Simplex s)
Implements Comparable interface.
|
Simplex |
copy()
Make a "blank" copy of the Simplex -- equivalent to getSimplex(this.vertices()).
|
int |
dimension()
Returns the dimension of self.
|
boolean |
equals(java.lang.Object obj)
Overrides Object equals.
|
int |
hashCode()
Overrides Object hashcode.
|
static Simplex |
makeSimplex(int[] vertices) |
static Simplex |
makeSimplexPresorted(int[] vertices) |
protected static long |
p8_v_to_l_hi_mid(int[] vertices) |
protected static long |
p8_v_to_l_hi(int[] vertices) |
protected static long |
p8_v_to_l_lo_mid(int[] vertices) |
protected static long |
p8_v_to_l_lo(int[] vertices) |
protected int |
v1() |
protected int |
v2() |
protected int |
v3() |
protected int |
v4() |
protected int |
v5() |
protected int |
v6() |
protected int |
v7() |
protected int |
v8() |
int[] |
vertices()
Returns the indices of self as an array.
|
int[] |
vertices(int[] verts)
Returns the indices of self in the given array argument.
|
addVertex, addVertex, boundary, chain, clearChain, decrement_findex, dist_sort, findex, getSimplex, getSimplex, getSimplexPresorted, getSimplexPresorted, makeEdge, makePoint, persistence_sort, setChain, setfindex, simplex_reverse_sort, subset, subset, toString, vertex_sort
public final long bits_lo
public final long bits_lo_mid
public final long bits_hi_mid
public final long bits_hi
protected static int VERTEX_BIT_SZ
protected static int MAX_8_INDEX
protected static long DIM_6_MASK
protected Packed8Simplex()
protected Packed8Simplex(long bits_lo_val, long bits_lo_mid_val, long bits_hi_mid_val, long bits_hi_val)
protected Packed8Simplex(int v1, int v2, int v3, int v4, int v5, int v6, int v7)
protected Packed8Simplex(int v1, int v2, int v3, int v4, int v5, int v6, int v7, int v8)
protected static boolean check_8_vertices(int[] v)
protected static void assert_8_vertices(int[] v)
protected static long p8_v_to_l_lo(int[] vertices)
protected static long p8_v_to_l_lo_mid(int[] vertices)
protected static long p8_v_to_l_hi_mid(int[] vertices)
protected static long p8_v_to_l_hi(int[] vertices)
protected int v8()
protected int v7()
protected int v6()
protected int v5()
protected int v4()
protected int v3()
protected int v2()
protected int v1()
public int hashCode()
public boolean equals(java.lang.Object obj)
protected int compareTo(Packed8Simplex s)
public int compareTo(Simplex s)
public Simplex copy()
public int dimension()
dimension
in class Simplex
Simplex.dimension()
public int[] vertices()
vertices
in class Simplex
Simplex.vertices()
public int[] vertices(int[] verts)
vertices
in class Simplex
verts
- the int[] into which the vertices, if any, are written.Simplex.vertices()
public static Simplex makeSimplex(int[] vertices)
public static Simplex makeSimplexPresorted(int[] vertices)
public Simplex[] boundaryArray()
It is simple enough to do explicitly, and it needs to be fast.
boundaryArray
in class Simplex
Simplex.vertices()