|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaitools.jiffle.runtime.JiffleFunctions
public class JiffleFunctions
Provides functions for Jiffle runtime objects. An instance of this class
is used as a field in AbstractJiffleRuntime.
| Constructor Summary | |
|---|---|
JiffleFunctions()
|
|
| Method Summary | |
|---|---|
double |
AND(double x,
double y)
Tests if both x and y are non-zero. |
List |
concatDL(double x,
List list)
Creates a new list by concatenating {2code x} and list. |
List |
concatLD(List list,
double x)
Creates a new list by concatenating list and {2code x}. |
List |
concatLL(List list1,
List list2)
Creates a new list by concatenating two existing lists. |
double |
degToRad(double x)
Converts an angle in degrees to radians. |
double |
EQ(double x,
double y)
Tests if x is equal to y. |
double |
GE(double x,
double y)
Tests if x is greater than or equal to y. |
double |
GT(double x,
double y)
Tests if x is greater than y. |
double |
isinf(double x)
Tests if x is infinite (equal to Double.POSITIVE_INFINITY or Double.NEGATIVE_INFINITY). |
double |
isnan(double x)
Tests if x is equal to Double.NaN. |
double |
isnull(double x)
Tests if x is null. |
double |
LE(double x,
double y)
Tests if x is less than or equal to y. |
double |
log2Arg(double x,
double b)
Gets the log of x to base b. |
double |
LT(double x,
double y)
Tests if x is less than y. |
double |
max(List values)
Gets the maximum of the input values. |
double |
mean(List values)
Gets the mean of the input values. |
double |
median(List values)
Gets the median of the input values. |
double |
min(List values)
Gets the minimum of the input values. |
double |
mode(List values)
Gets the mode of the input values. |
double |
NE(double x,
double y)
Tests if x is not equal to y. |
double |
NOT(double x)
Treats x as true if non-zero, or false if zero and then returns the logical complement. |
double |
OR(double x,
double y)
Tests if either x or y is non-zero. |
double |
radToDeg(double x)
Converts an angle in radians to degrees. |
double |
rand(double x)
Gets a random value between 0 (inclusive) and x (exclusive). |
double |
randInt(double x)
Gets a random integer value (actually a truncated double) between 0 (inclusive) and floor(x) (exclusive). |
double |
range(List values)
Gets the range of the input values. |
double |
round2Arg(double x,
double prec)
Rounds the input value to the given precision. |
double |
sdev(List values)
Gets the sample standard deviation of the input values. |
Integer |
sign(double x)
Return the sign of x as an integer. |
double |
sum(List values)
Gets the sum of the input values. |
double |
variance(List values)
Gets the sample variance of the input values. |
double |
XOR(double x,
double y)
Tests if just one of x or y is non-zero. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JiffleFunctions()
| Method Detail |
|---|
public double degToRad(double x)
x - input angle in degrees
public Integer sign(double x)
x as an integer. This method is used
by Jiffle to implement its various if functions.
x - test value
null if x is NaNpublic double isinf(double x)
x - test value
Double.Nan
if x is Double.Nanpublic double isnan(double x)
x - test value
public double isnull(double x)
isnan(double).
x - the test value
public double log2Arg(double x,
double b)
x - the valueb - the base
public double max(List values)
values - the input values
public double mean(List values)
values - the input values
public double median(List values)
values - the input values
public double min(List values)
values - the input values
public double mode(List values)
values - the input values
public double radToDeg(double x)
x - input angle in radians
public double rand(double x)
x - upper limit
public double randInt(double x)
floor(x) (exclusive).
x - upper limit
public double range(List values)
values - the input values
public double round2Arg(double x,
double prec)
x - the input valueprec - the desired precision
public double sdev(List values)
values - the input values
public double sum(List values)
values - the input values
public double variance(List values)
values - the input values
public double OR(double x,
double y)
x - x valuey - y value
Double.Nan if either x or y is Double.Nan
public double AND(double x,
double y)
x - x valuey - y value
Double.Nan if either x or y is Double.Nan
public double XOR(double x,
double y)
x - x valuey - y value
Double.Nan if either x or y is Double.Nan
public double GT(double x,
double y)
x - x valuey - y value
Double.Nan if either x or y is Double.Nan
public double GE(double x,
double y)
x - x valuey - y value
Double.Nan if either x or y is Double.Nan
public double LT(double x,
double y)
x - x valuey - y value
Double.Nan if either x or y is Double.Nan
public double LE(double x,
double y)
x - x valuey - y value
Double.Nan if either x or y is Double.Nan
public double EQ(double x,
double y)
x - x valuey - y value
Double.Nan if either x or y is Double.Nan
public double NE(double x,
double y)
x - x valuey - y value
Double.Nan if either x or y is Double.Nanpublic double NOT(double x)
x - the test value
Double.Nan if x is Double.Nan
public List concatDL(double x,
List list)
list.
x - the valuelist - the list
public List concatLD(List list,
double x)
list and {2code x}.
list - the listx - the value
public List concatLL(List list1,
List list2)
list1 - the first listlist2 - the second list
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||