|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectLinearTernaryCoreFloat
public final class LinearTernaryCoreFloat
The LinearTernaryCore class is acts as the backend for the invariant (ax + by + cz + d = 0) by processing samples and computing coefficients. The resulting coefficients a, b, c, and d are mutually relatively prime, and the coefficient a is always p
| Nested Class Summary | |
|---|---|
static class |
LinearTernaryCoreFloat.Flag
|
static class |
LinearTernaryCoreFloat.Point
|
| Field Summary | |
|---|---|
double |
a
|
double |
b
|
double |
c
|
double[] |
coefficients
|
double |
d
|
LinearTernaryCoreFloat.Point[] |
def_points
|
LinearTernaryCoreFloat.Flag |
line_flag
|
double |
max_a
|
double |
max_b
|
double |
max_c
|
double |
max_d
|
double |
min_a
|
double |
min_b
|
double |
min_c
|
double |
min_d
|
double |
separation
|
int |
values_seen
|
Invariant |
wrapper
|
| Constructor Summary | |
|---|---|
LinearTernaryCoreFloat(Invariant wrapper)
|
|
| Method Summary | |
|---|---|
InvariantStatus |
add_modified(double x,
double y,
double z,
int count)
Looks for points that define a plane (ax + by + cz + d = 0). |
String |
cache_repr()
|
double[] |
calc_tri_linear(LinearTernaryCoreFloat.Point[] points)
Calculates the coefficients (a, b, c) and constant (d) for the equation ax + by + cz + d = 0 using the first three points in points. |
LinearTernaryCoreFloat |
clone()
|
double |
computeConfidence()
|
boolean |
enoughSamples()
|
static String |
format_simplify(String vix,
String viy,
String viz,
double da,
double db,
double dc,
double dd)
|
String |
format_using(OutputFormat format,
String vix,
String viy,
String viz)
|
String |
format_using(OutputFormat format,
String vix,
String viy,
String viz,
double a,
double b,
double c,
double d)
|
boolean |
isActive()
Returns whether or not the invariant is currently active. |
boolean |
isExclusiveFormula(LinearTernaryCoreFloat other)
|
boolean |
isSameFormula(LinearTernaryCoreFloat other)
|
LinearTernaryCoreFloat |
merge(List<LinearTernaryCoreFloat> cores,
Invariant wrapper)
Merge the linear ternary cores in cores to form a new core. |
boolean |
mergeFormulasOk()
In general, we can't merge formulas, but we can merge invariants with too few samples to have formed a plane with invariants with enough samples. |
void |
permute(int[] permutation)
Reorganize our already-seen state as if the variables had shifted order underneath us (rearrangement given by the permutation). |
String |
point_repr(LinearTernaryCoreFloat.Point p)
|
String |
repr()
|
InvariantStatus |
setup(LinearBinaryFloat lb,
VarInfo con_var,
double con_val)
Sets up the invariant from a LinearBinary invariant and a constant value for the third variable. |
InvariantStatus |
setup(OneOfFloat oo,
VarInfo v1,
double con1,
VarInfo v2,
double con2)
Sets up the invariant from a OneOf and two constants. |
boolean |
try_new_equation(double x,
double y,
double z)
Calculates new coefficients that for the new point. |
| Methods inherited from class Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public double a
public double b
public double c
public double d
public double min_a
public double max_a
public double min_b
public double max_b
public double min_c
public double max_c
public double min_d
public double max_d
public double separation
public double[] coefficients
public LinearTernaryCoreFloat.Flag line_flag
public LinearTernaryCoreFloat.Point[] def_points
public Invariant wrapper
public int values_seen
| Constructor Detail |
|---|
public LinearTernaryCoreFloat(Invariant wrapper)
| Method Detail |
|---|
public LinearTernaryCoreFloat clone()
clone in class Objectpublic void permute(int[] permutation)
public boolean isActive()
public InvariantStatus setup(LinearBinaryFloat lb,
VarInfo con_var,
double con_val)
public InvariantStatus setup(OneOfFloat oo,
VarInfo v1,
double con1,
VarInfo v2,
double con2)
public InvariantStatus add_modified(double x,
double y,
double z,
int count)
FuzzyFloat
public boolean try_new_equation(double x,
double y,
double z)
public double[] calc_tri_linear(LinearTernaryCoreFloat.Point[] points)
points - array of points to use to calculate the coefficents. Only
the first three points are used
public boolean enoughSamples()
public double computeConfidence()
public String repr()
public String point_repr(LinearTernaryCoreFloat.Point p)
public String cache_repr()
public String format_using(OutputFormat format,
String vix,
String viy,
String viz,
double a,
double b,
double c,
double d)
public static String format_simplify(String vix,
String viy,
String viz,
double da,
double db,
double dc,
double dd)
public String format_using(OutputFormat format,
String vix,
String viy,
String viz)
public boolean isSameFormula(LinearTernaryCoreFloat other)
public boolean isExclusiveFormula(LinearTernaryCoreFloat other)
public boolean mergeFormulasOk()
public LinearTernaryCoreFloat merge(List<LinearTernaryCoreFloat> cores,
Invariant wrapper)
cores - List of LinearTernary cores to merge. They should
all be permuted to match the variable order in
ppt.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||