Class TriEncoder
java.lang.Object
TriEncoder
public class TriEncoder
- extends Object
A TriEncode translates between a Triangulation and a "slimmed down"
TriDigest object. In its present form, it stores diagonals compressed
to 1 byte per diagonal, and the neighbors as integers. This works only
for n up to 21. If we want to go higher, this class and the corresponding
TriDigest class will need to be rewritted.
TriEncoder
public TriEncoder(int n)
encode
public TriDigest encode(Triangulation tri)
encode
public TriDigest encode(PEdge[] diags,
long[] neighbors)
toString
public static String toString(long code,
PEdge[] diags)
toString
public String toString(long code,
TriDigest td)
getDiags
public PEdge[] getDiags(TriDigest td)
getNeighbors
public long[] getNeighbors(TriDigest td)
main
public static void main(String[] args)