Class TriEncoder

java.lang.Object
  extended by 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.


Constructor Summary
TriEncoder(int n)
           
 
Method Summary
 TriDigest encode(PEdge[] diags, long[] neighbors)
           
 TriDigest encode(Triangulation tri)
           
 PEdge[] getDiags(TriDigest td)
           
 long[] getNeighbors(TriDigest td)
           
static void main(String[] args)
           
static String toString(long code, PEdge[] diags)
           
 String toString(long code, TriDigest td)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TriEncoder

public TriEncoder(int n)
Method Detail

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)