10 Colt Single-Row Functions
A reference to Colt single-row functions included in Oracle Continuous Query Language (Oracle CQL) is provided. Colt single-row functions are based on the Colt open source libraries for high performance scientific and technical computing.
For more information, see Functions.
10.1 Introduction to Oracle CQLBuilt-In Single-Row Colt Functions
Table 10-1 lists the built-in single-row Colt functions that Oracle CQL provides.
Table 10-1 Oracle CQL Built-in Single-Row Colt-Based Functions
| Colt Package | Function |
|---|---|
|
A set of basic polynomials, rounding, and calculus functions. |
|
|
A set of Bessel functions. |
|
|
A table with good seeds for pseudo-random number generators. Each sequence in this table has a period of 10**9 numbers. |
|
|
A set of Gamma and Beta functions. |
|
|
A set of probability distributions. |
|
|
A set of non polymorphic, non bounds checking, low level bit-vector functions. |
|
|
A set of hash functions. |
Note:
Built-in function names are case sensitive and you must use them in the case shown (in lower case).
Note:
In stream input examples, lines beginning with h (such as h 3800) are heartbeat input tuples. These inform Oracle Event Processing that no further input will have a timestamp lesser than the heartbeat value.
For more information, see:
10.2 beta
Syntax

Purpose
beta is based on cern.jet.stat.Gamma. It returns the beta function (see Figure 10-1) of the input arguments as a double.
Figure 10-1 cern.jet.stat.Gamma beta

This function takes the following arguments:
-
double1: thexvalue. -
double2: theyvalue.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/random/Beta.html#Beta(double, double, cern.jet.random.engine.RandomEngine).
Examples
Consider the query qColt28. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation .
<query id="qColt28"><![CDATA[ select beta(c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 3.1415927 1000: + 1.899038 1200: + 1.251922 2000: + 4.226169
10.3 beta1
Syntax

Purpose
beta1 is based on cern.jet.stat.Probability. It returns the area P(x) from 0 to x under the beta density function (see Figure 10-2) as a double.
Figure 10-2 cern.jet.stat.Probability beta1

This function takes the following arguments:
-
double1: the alpha parameter of the beta distributiona. -
double2: the beta parameter of the beta distributionb. -
double3: the integration end pointx.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/random/Beta.html#Beta(double, double, cern.jet.random.engine.RandomEngine).
Examples
Consider the query qColt35. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt35"><![CDATA[ select beta1(c2,c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.5 1000: + 0.66235894 1200: + 0.873397 2000: + 0.44519535
10.4 betaComplemented
Syntax

Purpose
betaComplemented is based on cern.jet.stat.Probability. It returns the area under the right hand tail (from x to infinity) of the beta density function (see Figure 10-2) as a double.
This function takes the following arguments:
-
double1: the alpha parameter of the beta distributiona. -
double2: the beta parameter of the beta distributionb. -
double3: the integration end pointx.
For more information, see:
Examples
Consider the query qColt37. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt37"><![CDATA[ select betaComplemented(c2,c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.5 1000: + 0.66235894 1200: + 0.873397 2000: + 0.44519535
10.5 binomial
Syntax

Purpose
binomial is based on cern.jet.math.Arithmetic. It returns the binomial coefficient n over k (see Figure 10-3) as a double.
Figure 10-3 Definition of binomial coefficient

This function takes the following arguments:
-
double1: thenvalue. -
long2: thekvalue.
Table 10-2 lists the binomial function return values for various values of k.
Table 10-2 cern.jet.math.Arithmetic binomial Return Values
| Arguments | Return Value |
|---|---|
|
|
0 |
|
|
1 |
|
|
|
|
Any other value of |
Computed binomial coefficient as given in Figure 10-3. |
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Arithmetic.html#binomial(double, long).
Examples
Consider the query qColt6. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 long), the query returns the relation.
<query id="qColt6"><![CDATA[ select binomial(c2,c3) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + -0.013092041 1000: + -0.012374863 1200: + -0.0010145549 2000: + -0.0416
10.6 binomial1
Syntax

Purpose
binomial1 is based on cern.jet.math.Arithmetic. It returns the binomial coefficient n over k (see Figure 10-3) as a double.
This function takes the following arguments:
-
long1: thenvalue. -
long2: thekvalue.
Table 10-3 lists the BINOMIAL function return values for various values of k.
Table 10-3 cern.jet.math.Arithmetic Binomial1 Return Values
| Arguments | Return Value |
|---|---|
|
|
0 |
|
|
1 |
|
|
|
|
Any other value of |
Computed binomial coefficient as given in Figure 10-3. |
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/random/Binomial.html#Binomial(int, double, cern.jet.random.engine.RandomEngine).
Examples
Consider the query qColt7. Given the data stream SColtFunc with schema (c1 integer, c2 float, c3 long), the query returns the relation.
<query id="qColt7"><![CDATA[ select binomial1(c3,c3) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1.0 1000: + 1.0 1200: + 1.0 2000: + 1.0
10.7 binomial2
Syntax

Purpose
binomial2 is based on cern.jet.stat.Probability. It returns the sum of the terms 0 through k of the binomial probability density (see Figure 10-4) as a double.
Figure 10-4 cern.jet.stat.Probability binomial2

This function takes the following arguments (all arguments must be positive):
-
integer1: the end termk. -
integer2: the number of trialsn. -
double3: the probability of successpin (0.0, 1.0).
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#binomial(int, int, double).
Examples
Consider the query qColt34. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt34"><![CDATA[ select binomial2(c1,c1,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1.0 1000: + 1.0 1200: + 1.0 2000: + 1.0
10.8 binomialComplemented
Syntax

Purpose
binomialComplemented is based on cern.jet.stat.Probability. It returns the sum of the terms k+1 through n of the binomial probability density (see Figure 10-5) as a double.
Figure 10-5 cern.jet.stat.Probability binomialComplemented

This function takes the following arguments (all arguments must be positive):
-
integer1: the end termk. -
integer2: the number of trialsn. -
double3: the probability of successpin (0.0, 1.0).
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#binomialComplemented(int, int, double).
Examples
Consider the query qColt38. Given the data stream SColtFunc with schema (integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt38"><![CDATA[ select binomialComplemented(c1,c1,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.0 1000: + 0.0 1200: + 0.0 2000: + 0.0
10.9 bitMaskWithBitsSetFromTo
Syntax

Purpose
bitMaskWithBitsSetFromTo is based on cern.colt.bitvector.QuickBitVector. It returns a 64-bit wide bit mask as a long with bits in the specified range set to 1 and all other bits set to 0.
This function takes the following arguments:
-
integer1: thefromvalue; index of the start bit (inclusive). -
integer2: thetovalue; index of the end bit (inclusive).
Precondition (not checked): to - from + 1 >= 0 && to - from + 1 <= 64.
If to - from + 1 = 0 then returns a bit mask with all bits set to 0.
For more information, see:
Examples
Consider the query qColt53. Given the data stream SColtFunc with schema (c1 integer, c2 float, c3 bigint), the query returns the relation.
query id="qColt53"><![CDATA[ select bitMaskWithBitsSetFromTo(c1,c1) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 2 1000: + 16 1200: + 8 2000: + 256
10.10 ceil
Syntax

Purpose
ceil is based on cern.jet.math.Arithmetic. It returns the smallest long greater than or equal to its double argument.
This method is safer than using (float) java.lang.Math.ceil(long) because of possible rounding error.
For more information, see:
Examples
Consider the query qColt1. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt1"><![CDATA[ select ceil(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1 1000: + 1 1200: + 1 2000: + 1
10.11 chiSquare
Syntax

Purpose
chiSquare is based on cern.jet.stat.Probability. It returns the area under the left hand tail (from 0 to x) of the Chi square probability density function with v degrees of freedom (see Figure 10-6) as a double.
Figure 10-6 cern.jet.stat.Probability chiSquare

This function takes the following arguments (all arguments must be positive):
-
double1: the degrees of freedomv. -
double2: the integration end pointx.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#chiSquare(double, double).
Examples
Consider the query qColt39. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation .
<query id="qColt39"><![CDATA[ select chiSquare(c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.0 1000: + 0.0 1200: + 0.0 2000: + 0.0
10.12 chiSquareComplemented
Syntax

Purpose
chiSquareComplemented is based on cern.jet.stat.Probability. It returns the area under the right hand tail (from x to infinity) of the Chi square probability density function with v degrees of freedom (see Figure 10-6) as a double.
This function takes the following arguments (all arguments must be positive):
-
double1: the degrees of freedomv. -
double2: the integration end pointx.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#chiSquareComplemented(double, double).
Examples
Consider the query qColt40. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation .
<query id="qColt40"><![CDATA[ select chiSquareComplemented(c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.0 1000: + 0.0 1200: + 0.0 2000: + 0.0
10.13 errorFunction
Syntax

Purpose
errorFunction is based on cern.jet.stat.Probability. It returns the error function of the normal distribution of the double argument as a double, using the integral that Figure 10-7 shows.
Figure 10-7 cern.jet.stat.Probability errorFunction

For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#errorFunction(double).
Examples
Consider the query qColt41. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt41"><![CDATA[ select errorFunction(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.5204999 1000: + 0.6778012 1200: + 0.79184324 2000: + 0.42839235
10.14 errorFunctionComplemented
Syntax

Purpose
errorFunctionComplemented is based on cern.jet.stat.Probability. It returns the complementary error function of the normal distribution of the double argument as a double, using the integral that Figure 10-8 shows.
Figure 10-8 cern.jet.stat.Probability errorfunctioncompelemented

For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#errorFunctionComplemented(double).
Examples
Consider the query qColt42. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt42"><![CDATA[ select errorFunctionComplemented(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.47950011 1000: + 0.3221988 1200: + 0.20815676 2000: + 0.57160765
10.15 factorial
Syntax

Purpose
factorial is based on cern.jet.math.Arithmetic. It returns the factorial of the positive integer argument as a double.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Arithmetic.html#factorial(int).
Examples
Consider the query qColt8. Given the data stream SColtFunc with schema (c1 integer, c2 float, c3 bigint), the query returns the relation.
<query id="qColt8"><![CDATA[ select factorial(c1) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1.0 1000: + 24.0 1200: + 6.0 2000: + 40320.0
10.16 floor
Syntax

Purpose
floor is based on cern.jet.math.Arithmetic. It returns the largest long value less than or equal to the double argument.
This method is safer than using (double) java.lang.Math.floor(double) because of possible rounding error.
For more information, see:
Examples
Consider the query qColt2. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt2"><![CDATA[ select floor(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0 1000: + 0 1200: + 0 2000: + 0
10.17 gamma
Syntax

Purpose
gamma is based on cern.jet.stat.Gamma. It returns the Gamma function of the double argument as a double.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#gamma(double, double, double).
Examples
Consider the query qColt29. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt29"><![CDATA[ select gamma(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1.7724539 1000: + 1.2980554 1200: + 1.0768307 2000: + 2.2181594
10.18 gamma1
Syntax

Purpose
gamma1 is based on cern.jet.stat.Probability. It returns the integral from zero to x of the gamma probability density function (see Figure 10-9) as a double.
Figure 10-9 cern.jet.stat.Probability gamma1

This function takes the following arguments:
-
double1: the gamma distribution alpha valuea -
double2: the gamma distribution beta or lambda valueb -
double3: the integration end pointx.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/random/Gamma.html#Gamma(double, double, cern.jet.random.engine.RandomEngine).
Examples
Consider the query qColt36. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt36"><![CDATA[ select gamma1(c2,c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.5204999 1000: + 0.55171627 1200: + 0.59975785 2000: + 0.51785487
10.19 gammaComplemented
Syntax

Purpose
gammaComplemented is based on cern.jet.stat.Probability. It returns the integral from x to infinity of the gamma probability density function (see Figure 10-10) as a double.
Figure 10-10 cern.jet.stat.Probability gammaComplemented

This function takes the following arguments:
-
double1: the gamma distribution alpha valuea -
double2: the gamma distribution beta or lambda valueb -
double3: the integration end pointx.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#gammaComplemented(double, double, double).
Examples
Consider the query qColt43. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt43"><![CDATA[ select gammaComplemented(c2,c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.47950011 1000: + 0.44828376 1200: + 0.40024218 2000: + 0.48214513
10.20 getSeedAtRowColumn
Syntax

Purpose
getSeedAtRowColumn is based on cern.jet.random.engine.RandomSeedTable. It returns a deterministic seed as an integer from a (seemingly gigantic) matrix of predefined seeds.
This function takes the following arguments:
-
integer1: therowvalue; should (but need not) be in[0,Integer.MAX_VALUE]. -
integer2: thecolumnvalue; should (but need not) be in[0,1].
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/random/engine/RandomSeedTable.html#getSeedAtRowColumn(int, int).
Examples
Consider the query qColt27. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt27"><![CDATA[ select getSeedAtRowColumn(c1,c1) from SColtFunc ]]></query>
Tmestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 253987020 1000: + 1289741558 1200: + 417696270 2000: + 350557787
10.21 hash
Syntax

Purpose
hash is based on cern.colt.map.HashFunctions. It returns an integer hashcode for the specified double value.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/colt/map/HashFunctions.html#hash(double).
Examples
Consider the query qColt56. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt56"><![CDATA[ select hash(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1071644672 1000: + 1608935014 1200: + 2146204385 2000: + -1613129319
10.22 hash1
Syntax

Purpose
hash1 is based on cern.colt.map.HashFunctions. It returns an integer hashcode for the specified float value.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/colt/map/HashFunctions.html#hash(float).
Examples
Consider the query qColt57. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt57"><![CDATA[ select hash1(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1302214522 1000: + 1306362078 1200: + 1309462552 2000: + 1300047248
10.23 hash2
Syntax

Purpose
hash2 is based on cern.colt.map.HashFunctions. It returns an integer hashcode for the specified integer value.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/colt/map/HashFunctions.html#hash(int).
Examples
Consider the query qColt58. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt58"><![CDATA[ select hash2(c1) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1 1000: + 4 1200: + 3 2000: + 8
10.24 hash3
Syntax

Purpose
hash3 is based on cern.colt.map.HashFunctions. It returns an integer hashcode for the specified long value.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/colt/map/HashFunctions.html#hash(long).
Examples
Consider the query qColt59. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt59"><![CDATA[ select hash3(c3) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 8 1000: + 6 1200: + 12 2000: + 4
10.25 i0
Syntax

Purpose
i0 is based on cern.jet.math.Bessel. It returns the modified Bessel function of order 0 of the double argument as a double.
The function is defined as i0(x) = j0(ix).
The range is partitioned into the two intervals [0,8] and (8,infinity).
For more information, see:
Examples
Consider the query qColt12. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt12"><![CDATA[ select i0(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1.0634834 1000: + 1.126303 1200: + 1.2080469 2000: + 1.0404018
10.26 i0e
Syntax

Purpose
i0e is based on cern.jet.math.Bessel. It returns the exponentially scaled modified Bessel function of order 0 of the double argument as a double.
The function is defined as: i0e(x) = exp(-|x|) j0(ix).
For more information, see:
Examples
Consider the query qColt13. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt13"><![CDATA[ select i0e(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.64503527 1000: + 0.55930555 1200: + 0.4960914 2000: + 0.6974022
10.27 i1
Syntax

Purpose
i1 is based on cern.jet.math.Bessel. It returns the modified Bessel function of order 1 of the double argument as a double.
The function is defined as: i1(x) = -i j1(ix).
The range is partitioned into the two intervals [0,8] and (8,infinity). Chebyshev polynomial expansions are employed in each interval.
For more information, see:
Examples
Consider the query qColt14. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt14"><![CDATA[ select i1(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.2578943 1000: + 0.37187967 1200: + 0.49053898 2000: + 0.20402676
10.28 i1e
Syntax

Purpose
i1e is based on cern.jet.math.Bessel. It returns the exponentially scaled modified Bessel function of order 1 of the double argument as a double.
The function is defined as i1(x) = -i exp(-|x|) j1(ix).
For more information, see
Examples
Consider the query qColt15. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt15"><![CDATA[ select i1e(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.1564208 1000: + 0.18466999 1200: + 0.20144266 2000: + 0.13676323
10.29 incompleteBeta
Syntax

Purpose
incompleteBeta is based on cern.jet.stat.Gamma. It returns the Incomplete Beta Function evaluated from zero to x as a double.
This function takes the following arguments:
-
double1: the beta distribution alpha valuea -
double2: the beta distribution beta valueb -
double3: the integration end pointx.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Gamma.html#incompleteBeta(double, double, double).
Examples
Consider the query qColt30. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt30"><![CDATA[ select incompleteBeta(c2,c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.5 1000: + 0.66235894 1200: + 0.873397 2000: + 0.44519535
10.30 incompleteGamma
Syntax

Purpose
incompleteGamma is based on cern.jet.stat.Gamma. It returns the Incomplete Gamma function of the arguments as a double.
This function takes the following arguments:
-
double1: the gamma distribution alpha valuea. -
double2: the integration end pointx.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Gamma.html#incompleteGamma(double, double).
Examples
Consider the query qColt31. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt31"><![CDATA[ select incompleteGamma(c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.6826895 1000: + 0.6565891 1200: + 0.6397422 2000: + 0.7014413
10.31 incompleteGammaComplement
Syntax

Purpose
incompleteGammaComplement is based on cern.jet.stat.Gamma. It returns the Complemented Incomplete Gamma function of the arguments as a double.
This function takes the following arguments:
-
double1: the gamma distribution alpha valuea. -
double2: the integration start pointx.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Gamma.html#incompleteGammaComplement(double, double).
Examples
Consider the query qColt32. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt32"><![CDATA[ select incompleteGammaComplement(c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.3173105 1000: + 0.34341094 1200: + 0.3602578 2000: + 0.29855874
10.32 j0
Syntax

Purpose
j0 is based on cern.jet.math.Bessel. It returns the Bessel function of the first kind of order 0 of the double argument as a double.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Bessel.html#j0(double).
Examples
Consider the query qColt16. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt16"><![CDATA[ select j0(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.9384698 1000: + 0.8812009 1200: + 0.8115654 2000: + 0.9603982
10.33 j1
Syntax

Purpose
j1 is based on cern.jet.math.Bessel. It returns the Bessel function of the first kind of order 1 of the double argument as a double.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Bessel.html#j1(double).
Examples
Consider the query qColt17. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt17"><![CDATA[ select j1(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.24226846 1000: + 0.32899573 1200: + 0.40236986 2000: + 0.19602658
10.34 jn
Syntax

Purpose
jn is based on cern.jet.math.Bessel. It returns the Bessel function of the first kind of order n of the argument as a double.
This function takes the following arguments:
-
integer1: the order of the Bessel functionn. -
double2: the value to compute the bessel function ofx.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Bessel.html#jn(int, double).
Examples
Consider the query qColt18. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt18"><![CDATA[ select jn(c1,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.24226846 1000: + 6.1009696E-4 1200: + 0.0139740035 2000: + 6.321045E-11
10.35 k0
Syntax

Purpose
k0 is based on cern.jet.math.Bessel. It returns the modified Bessel function of the third kind of order 0 of the double argument as a double.
The range is partitioned into the two intervals [0,8] and (8, infinity). Chebyshev polynomial expansions are employed in each interval.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Bessel.html#k0(double).
Examples
Consider the query qColt19. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt19"><![CDATA[ select k0(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.92441905 1000: + 0.6605199 1200: + 0.49396032 2000: + 1.1145291
10.36 k0e
Syntax

Purpose
k0e is based on cern.jet.math.Bessel. It returns the exponentially scaled modified Bessel function of the third kind of order 0 of the double argument as a double.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Bessel.html#k0e(double).
Examples
Consider the query qColt20. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt20"><![CDATA[ select k0e(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1.5241094 1000: + 1.3301237 1200: + 1.2028574 2000: + 1.662682
10.37 k1
Syntax

Purpose
k1 is based on cern.jet.math.Bessel. It returns the modified Bessel function of the third kind of order 1 of the double argument as a double.
The range is partitioned into the two intervals [0,2] and (2, infinity). Chebyshev polynomial expansions are employed in each interval.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Bessel.html#k1(double).
Examples
Consider the query qColt21. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt21"><![CDATA[ select k1(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1.6564411 1000: + 1.0502836 1200: + 0.7295154 2000: + 2.1843543
10.38 k1e
Syntax

Purpose
k1e is based on cern.jet.math.Bessel. It returns the exponentially scaled modified Bessel function of the third kind of order 1 of the double argument as a double.
The function is defined as: k1e(x) = exp(x) * k1(x).
For more information, see:
Examples
Consider the query qColt22. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt22"><![CDATA[ select k1e(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 2.7310097 1000: + 2.1150115 1200: + 1.7764645 2000: + 3.258674
10.39 kn
Syntax

Purpose
kn is based on cern.jet.math.Bessel. It returns the modified Bessel function of the third kind of order n of the argument as a double.
This function takes the following arguments:
-
integer1: thenvalue order of the Bessel function. -
double2: thexvalue to compute the bessel function of.
The range is partitioned into the two intervals [0,9.55] and (9.55, infinity). An ascending power series is used in the low range, and an asymptotic expansion in the high range.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Bessel.html#kn(int, double).
Examples
Consider the query qColt23. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt23"><![CDATA[ select kn(c1,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1.6564411 1000: + 191.99422 1200: + 10.317473 2000: + 9.7876858E8
10.40 leastSignificantBit
Syntax

Purpose
leastSignificantBit is based on cern.colt.bitvector.QuickBitVector. It returns the index (as an integer) of the least significant bit in state true of the integer argument. Returns 32 if no bit is in state true.
For more information, see:
Examples
Consider the query qColt54. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt54"><![CDATA[ select leastSignificantBit(c1) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0 1000: + 2 1200: + 0 2000: + 3
10.41 log
Syntax

Purpose
log is based on cern.jet.math.Arithmetic. It returns the computation that Figure 10-11 shows as a double.
Figure 10-11 cern.jet.math.Arithmetic log

This function takes the following arguments:
-
double1: thebase. -
double2: thevalue.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Arithmetic.html#log(double, double).
Examples
Consider the query qColt3. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt3"><![CDATA[ select log(c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1.0 1000: + 1.0 1200: + 1.0 2000: + 1.0
10.42 log10
Syntax

Purpose
log10 is based on cern.jet.math.Arithmetic. It returns the base 10 logarithm of a double value as a double.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Arithmetic.html#log10(double).
Examples
Consider the query qColt4. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt4"><![CDATA[ select log10(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + -0.30103 1000: + -0.15490197 1200: + -0.050610002 2000: + -0.39794
10.43 log2
Syntax

Purpose
log2 is based on cern.jet.math.Arithmetic. It returns the base 2 logarithm of a double value as a double.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Arithmetic.html#log2(double).
Examples
Consider the query qColt9. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt9"><![CDATA[ select log2(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + -1.0 1000: + -0.5145732 1200: + -0.16812278 2000: + -1.321928
10.44 logFactorial
Syntax

Purpose
logFactorial is based on cern.jet.math.Arithmetic. It returns the natural logarithm (base e) of the factorial of its integer argument as a double
For argument values k<30, the function looks up the result in a table in O(1). For argument values k>=30, the function uses Stirlings approximation.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Arithmetic.html#logFactorial(int).
Examples
Consider the query qColt10. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt10"><![CDATA[ select logFactorial(c1) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.0 1000: + 3.1780539 1200: + 1.7917595 2000: + 10.604603
10.45 logGamma
Syntax

Purpose
logGamma is based on cern.jet.stat.Gamma. It returns the natural logarithm (base e) of the gamma function of the double argument as a double.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Gamma.html#logGamma(double).
Examples
Consider the query qColt33. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt33"><![CDATA[ select logGamma(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.5723649 1000: + 0.26086727 1200: + 0.07402218 2000: + 0.7966778
10.46 longFactorial
Syntax

Purpose
longFactorial is based on cern.jet.math.Arithmetic. It returns the factorial of its integer argument (in the range k >= 0 && k < 21) as a long.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Arithmetic.html#longFactorial(int).
Examples
Consider the query qColt11. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt11"><![CDATA[ select longFactorial(c1) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1 1000: + 24 1200: + 6 2000: + 40320
10.47 mostSignificantBit
Syntax

Purpose
mostSignificantBit is based on cern.colt.bitvector.QuickBitVector. It returns the index (as an integer) of the most significant bit in state true of the integer argument. Returns -1 if no bit is in state true.
For more information, see:
Examples
Consider the query qColt55. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt55"><![CDATA[ select mostSignificantBit(c1) from SColtFunc ]]></view>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0 1000: + 2 1200: + 1 2000: + 3
10.48 negativeBinomial
Syntax

Purpose
negativeBinomial is based on cern.jet.stat.Probability. It returns the sum of the terms 0 through k of the Negative Binomial Distribution (see Figure 10-12) as a double.
Figure 10-12 cern.jet.stat.Probability negativeBinomial

This function takes the following arguments:
-
integer1: the end termk. -
integer2: the number of trialsn. -
double3: the probability of successpin (0.0,1.0).
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#negativeBinomial(int, int, double).
Examples
Consider the query qColt44. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt44"><![CDATA[ select negativeBinomial(c1,c1,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.75 1000: + 0.94203234 1200: + 0.99817264 2000: + 0.28393665
10.49 negativeBinomialComplemented
Syntax

Purpose
negativeBinomialComplemented is based on cern.jet.stat.Probability. It returns the sum of the terms k+1 to infinity of the Negative Binomial distribution (see Figure 10-13) as a double.
Figure 10-13 cern.jet.stat.Probability negativeBinomialComplemented

This function takes the following arguments:
-
integer1: the end termk. -
integer2: the number of trialsn. -
double3: the probability of successpin (0.0,1.0).
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#negativeBinomialComplemented(int, int, double).
Examples
Consider the query qColt45. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt45"><![CDATA[ select negativeBinomialComplemented(c1,c1,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.25 1000: + 0.05796766 1200: + 0.0018273441 2000: + 0.7160633
10.50 normal
Syntax

Purpose
normal is based on cern.jet.stat.Probability. It returns the area under the Normal (Gaussian) probability density function, integrated from minus infinity to the double argument x (see Figure 10-14) as a double.
Figure 10-14 cern.jet.stat.Probability normal

For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#normal(double).
Examples
Consider the query qColt46. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt46"><![CDATA[ select normal(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.69146246 1000: + 0.7580363 1200: + 0.81326705 2000: + 0.65542173
10.51 normal1
Syntax

Purpose
normal1 is based on cern.jet.stat.Probability. It returns the area under the Normal (Gaussian) probability density function, integrated from minus infinity to x (see Figure 10-15) as a double.
Figure 10-15 cern.jet.stat.Probability normal1

This function takes the following arguments:
-
double1: the normal distributionmean. -
double2: the variance of the normal distributionv. -
double3: the integration limitx.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#normal(double, double, double).
Examples
Consider the query qColt47. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt47"><![CDATA[ select normal1(c2,c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.5 1000: + 0.5 1200: + 0.5 2000: + 0.5
10.52 normalInverse
Syntax

Purpose
normalInverse is based on cern.jet.stat.Probability. It returns the double value, x, for which the area under the Normal (Gaussian) probability density function (integrated from minus infinity to x) equals the double argument y (assumes mean is zero and variance is one).
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#normalInverse(double).
Examples
Consider the query qColt48. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt48"><![CDATA[ select normalInverse(c2) from SColtFunc ]]></view>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.0 1000: + 0.5244005 1200: + 1.226528 2000: + 0.2533471
10.53 poisson
Syntax

Purpose
poisson is based on cern.jet.stat.Probability. It returns the sum of the first k terms of the Poisson distribution (see Figure 10-16) as a double.
Figure 10-16 cern.jet.stat.Probability poisson

This function takes the following arguments:
-
integer1: the number of termsk. -
double2: the mean of the Poisson distributionm.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#poisson(int, double).
Examples
Consider the query qColt49. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt49"><![CDATA[ select poisson(c1,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.909796 1000: + 0.9992145 1200: + 0.9870295 2000: + 1.0
10.54 poissonComplemented
Syntax

Purpose
poissonComplemented is based on cern.jet.stat.Probability. It returns the sum of the terms k+1 to Infinity of the Poisson distribution (see Figure 10-17) as a double.
Figure 10-17 cern.jet.stat.Probability poissonComplemented

This function takes the following arguments:
-
integer1: the start termk. -
double2: the mean of the Poisson distributionm.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#poissonComplemented(int, double).
Examples
Consider the query qColt50. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt50"><![CDATA[ select poissonComplemented(c1,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.09020401 1000: + 7.855354E-4 1200: + 0.012970487 2000: + 5.043364E-10
10.55 stirlingCorrection
Syntax

Purpose
stirlingCorrection is based on cern.jet.math.Arithmetic. It returns the correction term of the Stirling approximation of the natural logarithm (base e) of the factorial of the integer argument (see Figure 10-18) as a double.
Figure 10-18 cern.jet.math.Arithmetic stirlingCorrection

For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Arithmetic.html#stirlingCorrection(int).
Examples
Consider the query qColt5. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt5"><![CDATA[ select stirlingCorrection(c1) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.08106147 1000: + 0.020790672 1200: + 0.027677925 2000: + 0.010411265
10.56 studentT
Syntax

Purpose
studentT is based on cern.jet.stat.Probability. It returns the integral from minus infinity to t of the Student-t distribution with k > 0 degrees of freedom (see Figure 10-19) as a double.
Figure 10-19 cern.jet.stat.Probability studentT

This function takes the following arguments:
-
double1: the degrees of freedomk. -
double2: the integration end pointt.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/stat/Probability.html#studentT(double, double).
Examples
Consider the query qColt51. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt51"><![CDATA[ select studentT(c2,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 0.621341 1000: + 0.67624015 1200: + 0.7243568 2000: + 0.5930112
10.57 studentTInverse
Syntax

Purpose
studentTInverse is based on cern.jet.stat.Probability. It returns the double value, t, for which the area under the Student-t probability density function (integrated from minus infinity to t) equals 1-alpha/2. The value returned corresponds to the usual Student t-distribution lookup table for talpha[size]. This function uses the studentt function to determine the return value iteratively.
This function takes the following arguments:
-
double1: the probabilityalpha. -
integer2: the data set size.
For more information, see:
Examples
Consider the query qColt52. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt52"><![CDATA[ select studentTInverse(c2,c1) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + 1.0 1000: + 0.4141633 1200: + 0.15038916 2000: + 0.8888911
10.58 y0
Syntax

Purpose
y0 is based on cern.jet.math.Bessel. It returns the Bessel function of the second kind of order 0 of the double argument as a double.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Bessel.html#y0(double).
Examples
Consider the query qColt24. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt24"><![CDATA[ select y0(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + -0.44451874 1000: + -0.19066493 1200: + -0.0031519707 2000: + -0.60602456
10.59 y1
Syntax

Purpose
y1 is based on cern.jet.math.Bessel. It returns the Bessel function of the second kind of order 1 of the float argument as a double.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Bessel.html#y1(double).
Examples
Consider the query qColt25. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt25"><![CDATA[ select y1(c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + -1.4714724 1000: + -1.1032499 1200: + -0.88294965 2000: + -1.780872
10.60 yn
Syntax

Purpose
yn is based on cern.jet.math.Bessel. It returns the Bessel function of the second kind of order n of the double argument as a double.
This function takes the following arguments:
-
integer1: thenvalue order of the Bessel function. -
double2: thexvalue to compute the Bessel function of.
For more information, see https://dst.lbl.gov/ACSSoftware/colt/api/cern/jet/math/Bessel.html#yn(int, double).
Examples
Consider the query qColt26. Given the data stream SColtFunc with schema (c1 integer, c2 double, c3 bigint), the query returns the relation.
<query id="qColt26"><![CDATA[ select yn(c1,c2) from SColtFunc ]]></query>
Timestamp Tuple 10 1,0.5,8 1000 4,0.7,6 1200 3,0.89,12 2000 8,0.4,4
Timestamp Tuple Kind Tuple 10: + -1.4714724 1000: + -132.63406 1200: + -8.020442 2000: + -6.3026547E8