edu.stanford.math.plex
public class Packed6Simplex extends Simplex
The Packed6Simplex
class implements the abstract class
Simplex
for Simplices of dimension 4-5 by storing the
vertices as 6 packed positive integer values in three long
integers. This limits us to H4 calculations with this representation,
but it is unlikely that we can go to higher dimensions without an
alteration of the basic algorithm.
Modifier and Type | Field and Description |
---|---|
long |
bits_hi |
long |
bits_lo |
long |
bits_mid |
protected static long |
DIM_4_MASK |
protected static int |
MAX_6_INDEX |
protected static int |
VERTEX_BIT_SZ |
Modifier | Constructor and Description |
---|---|
protected |
Packed6Simplex() |
protected |
Packed6Simplex(long bits_lo_val,
long bits_mid_val,
long bits_hi_val) |
Modifier and Type | Method and Description |
---|---|
protected static void |
assert_6_vertices(int[] v) |
Simplex[] |
boundaryArray()
Returns the boundary of self.
|
protected static boolean |
check_6_vertices(int[] v) |
protected int |
compareTo(Packed6Simplex 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 |
p6_v_to_l_hi(int[] vertices) |
protected static long |
p6_v_to_l_lo(int[] vertices) |
protected static long |
p6_v_to_l_mid(int[] vertices) |
protected int |
v1() |
protected int |
v2() |
protected int |
v3() |
protected int |
v4() |
protected int |
v5() |
protected int |
v6() |
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_mid
public final long bits_hi
protected static int VERTEX_BIT_SZ
protected static int MAX_6_INDEX
protected static long DIM_4_MASK
protected Packed6Simplex()
protected Packed6Simplex(long bits_lo_val, long bits_mid_val, long bits_hi_val)
protected static boolean check_6_vertices(int[] v)
protected static void assert_6_vertices(int[] v)
protected static long p6_v_to_l_lo(int[] vertices)
protected static long p6_v_to_l_mid(int[] vertices)
protected static long p6_v_to_l_hi(int[] vertices)
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(Packed6Simplex 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()