public class SAXUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
SAX_MAX_LEVELS
Maximum number of levels a SAX symbol can have.
|
| Constructor and Description |
|---|
SAXUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
bSAX(int levels,
int[] symbols)
Return a binary representation (bSAX) given an array of SAX symbols
and a number of levels.
|
static double |
erf(double d) |
static double |
erfc(double d) |
static double |
erfcx(double d) |
static int[] |
fromBSAX(int levels,
int wordlen,
byte[] bsax) |
static double |
fromSAX(int levels,
int sax,
boolean random)
Return an artificial value from a sax symbol and a given alphabet size (2**levels)
|
static double[] |
getBounds(int n)
Return bounds computed so each interval covers an equal area under
the N(0,1) curve.
|
static double |
getInvCDF(double d,
boolean highPrecision) |
static java.lang.String[] |
indexable(int wordlen,
int levels,
byte[] bSAX)
Return a String representation of the various levels of detail suitable
for doing multiresolution indexing.
|
static double |
refine(double x,
double d) |
static int |
SAX(int levels,
double value)
Return a SAX symbol given a double value and a number of levels.
|
public static final int SAX_MAX_LEVELS
public static double getInvCDF(double d,
boolean highPrecision)
public static double erf(double d)
public static double erfc(double d)
public static double erfcx(double d)
public static double refine(double x,
double d)
public static double[] getBounds(int n)
n - Number of intervals to computepublic static int SAX(int levels,
double value)
value - levels - public static double fromSAX(int levels,
int sax,
boolean random)
levels - log2 of alphabet sizesax - Sax symbol to convertrandom - Should the returned value be choosen at random in the intervaljava.lang.RuntimeException - if an invalid parameter is passedpublic static java.lang.String[] indexable(int wordlen,
int levels,
byte[] bSAX)
levels - Number of levelsbSAX - encodedpublic static byte[] bSAX(int levels,
int[] symbols)
levels - Number of levels to consider for the alphabet (2**levels elements)
levels can be in the range 1 to SAX_MAX_LEVELpublic static int[] fromBSAX(int levels,
int wordlen,
byte[] bsax)