Package math
BigArrayGCVerify #sleela 2.5 (lib/math/examples/BigArrayGCVerify.sleela)
BigArrayGCVerify class
Regression guard for the incremental-GC allocate-black fix. It allocates two large int[] arrays and fills them in a long loop, which forces a garbage-collection cycle to run WHILE a second large array is being allocated and populated. Before the fix, an object allocated during the GC's marking phase was not on that cycle's root snapshot and was swept as garbage even though it was a live local -- surfacing as "index assignment on a non-array value" partway through the fill. This program must run to completion and report the expected last elements.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
BigIntegerDemo #sleela 2.5 (lib/math/examples/BigIntegerDemo.sleela)
BigIntegerDemo class
Demonstrates native big-integer multiplication through the VM bridge. SLBigInteger.multiply() calls the bigmul() builtin (opcode OP_BIGMUL), which multiplies base-1e9 limb arrays with a C Karatsuba kernel in one native call. Shows exact products and a large-operand timing. Sibling .sleela files in the package are auto-linked by the runner.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
BigMulVerify #sleela 2.5 (lib/math/examples/BigMulVerify.sleela)
BigMulVerify class
Regression check for the native big-integer multiply (OP_BIGMUL). It multiplies the same operands two ways -- the native bigmul() bridge and a pure-SLeeLa schoolbook multiply -- across several operand sizes spanning the Karatsuba threshold, and asserts the limb arrays are identical. This guards the Karatsuba recombination (the z1 = z1 - z0 - z2 borrow, which must carry a borrow of up to two per limb) against silent regressions.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
schoolbook | int schoolbook(int[] a, int na, int[] b, int nb, int[] r) | Pure-SLeeLa reference multiply over base-1e9 limbs. |
nextLimb | int nextLimb(int seed) | A tiny deterministic limb generator (linear congruential), values in [0,1e9). |
checkSize | int checkSize(int n, int seed) | Multiply n-limb operands both ways; return the count of mismatched limbs. |
main | void main() | No description in source. |
BigNumOpsVerify #sleela 2.5 (lib/math/examples/BigNumOpsVerify.sleela)
BigNumOpsVerify class
Regression guard for the native big-integer op set -- bigmul (now with an NTT fast path above 512 limbs), bigadd, and bigdivmod. It checks each native op against a pure-SLeeLa reference across sizes that exercise both the Karatsuba and NTT multiply paths, and must report PASS.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
school | int school(int[] a, int na, int[] b, int nb, int[] r) | No description in source. |
fillRandom | int fillRandom(int[] x, int n, int seed) | No description in source. |
mulMismatch | int mulMismatch(int n, int seed) | No description in source. |
main | void main() | No description in source. |
MathDemo #sleela 2.5 (lib/math/examples/MathDemo.sleela)
MathDemo class
A runnable tour of the lib/math package exercising a cross-section of the real implementations: number theory, statistics, linear algebra, calculus, geometry, a distribution, and a linear solve. Sibling .sleela files in the package are auto-linked by the runner.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
PiReferenceDemo #sleela 2.5 (lib/math/examples/PiReferenceDemo.sleela)
PiReferenceDemo class
Reports the SLeeLa Modium static pi reference and the math precision norms, and self-verifies pi. SLeeLa prints the verification result on compile (check) and run, so a reader sees that the pi value is correct.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
SLAbsoluteValue #sleela 2.5 (lib/math/SLAbsoluteValue.sleela)
SLAbsoluteValue class
Defines the SLeeLa standard-library type SLAbsoluteValue used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
ofDouble | double ofDouble(double x) | No description in source. |
ofInt | int ofInt(int x) | No description in source. |
ofLong | long ofLong(long x) | No description in source. |
SLAccumulation #sleela 2.5 (lib/math/SLAccumulation.sleela)
SLAccumulation class
Defines the SLeeLa standard-library type SLAccumulation used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
total | double total | No description in source. |
count | int count | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
reset | void reset() | No description in source. |
add | void add(double v) | No description in source. |
sum | double sum() | No description in source. |
mean | double mean() | No description in source. |
getCount | int getCount() | No description in source. |
SLAdjacencyMatrix #sleela 2.5 (lib/math/SLAdjacencyMatrix.sleela)
SLAdjacencyMatrix class
Defines the SLeeLa standard-library type SLAdjacencyMatrix used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
n | int n | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int size) | No description in source. |
addEdge | void addEdge(double[] m, int u, int v) | No description in source. |
adjacent | boolean adjacent(double[] m, int u, int v) | No description in source. |
degree | int degree(double[] m, int u) | No description in source. |
SLAlgebra #sleela 2.5 (lib/math/SLAlgebra.sleela)
SLAlgebra class
Defines the SLeeLa standard-library type SLAlgebra used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
solveQuadratic | int solveQuadratic(double a, double b, double c, double[] out) | No description in source. |
evaluateLinear | double evaluateLinear(double m, double b, double x) | No description in source. |
SLAngle #sleela 2.5 (lib/math/SLAngle.sleela)
SLAngle class
Defines the SLeeLa standard-library type SLAngle used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
radians | double radians | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
pi | double pi() | No description in source. |
setRadians | void setRadians(double r) | No description in source. |
setDegrees | void setDegrees(double d) | No description in source. |
getRadians | double getRadians() | No description in source. |
getDegrees | double getDegrees() | No description in source. |
normalized | double normalized() | Normalize to the half-open interval from 0 up to two pi. |
SLANOVA #sleela 2.5 (lib/math/SLANOVA.sleela)
SLANOVA class
Defines the SLeeLa standard-library type SLANOVA used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
mean | double mean(double[] xs, int n) | No description in source. |
fStatistic | double fStatistic(double[] groupMeans, int[] groupSizes, int g, | No description in source. |
SLApproximation #sleela 2.5 (lib/math/SLApproximation.sleela)
SLApproximation class
Defines the SLeeLa standard-library type SLApproximation used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
absd | double absd(double x) | No description in source. |
relativeError | double relativeError(double approx, double exact) | Relative error |approx - exact| / |exact|. |
absoluteError | double absoluteError(double approx, double exact) | No description in source. |
SLArithmetic #sleela 2.5 (lib/math/SLArithmetic.sleela)
SLArithmetic class
Defines the SLeeLa standard-library type SLArithmetic used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
add | double add(double a, double b) | No description in source. |
subtract | double subtract(double a, double b) | No description in source. |
multiply | double multiply(double a, double b) | No description in source. |
divide | double divide(double a, double b) | No description in source. |
negate | double negate(double a) | No description in source. |
SLAverage #sleela 2.5 (lib/math/SLAverage.sleela)
SLAverage class
Defines the SLeeLa standard-library type SLAverage used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double[] xs, int n) | No description in source. |
weighted | double weighted(double[] xs, double[] ws, int n) | Weighted average: sum(w*x) / sum(w). |
SLBayes #sleela 2.5 (lib/math/SLBayes.sleela)
SLBayes class
Defines the SLeeLa standard-library type SLBayes used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
posterior | double posterior(double pBgivenA, double pA, double pBgivenNotA) | No description in source. |
SLBezier #sleela 2.5 (lib/math/SLBezier.sleela)
SLBezier class
Defines the SLeeLa standard-library type SLBezier used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
cubic | double cubic(double p0, double p1, double p2, double p3, double t) | No description in source. |
quadratic | double quadratic(double p0, double p1, double p2, double t) | No description in source. |
SLBigDecimal #sleela 2.5 (lib/math/SLBigDecimal.sleela)
SLBigDecimal class
Defines the SLeeLa standard-library type SLBigDecimal used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
unscaled | long unscaled | No description in source. |
scale | int scale | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(long value, int decimalPlaces) | No description in source. |
toDouble | double toDouble() | No description in source. |
getUnscaled | long getUnscaled() | No description in source. |
getScale | int getScale() | No description in source. |
SLBigInteger #sleela 2.5 (lib/math/SLBigInteger.sleela)
SLBigInteger class
Defines the SLeeLa standard-library type SLBigInteger used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
limbs | int[] limbs | No description in source. |
count | int count | No description in source. |
sign | int sign | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
fromLong | void fromLong(long v) | No description in source. |
limbCount | int limbCount() | No description in source. |
getSign | int getSign() | No description in source. |
fromLimbs | void fromLimbs(int[] ls, int n, int sgn) | Build directly from a caller-held limb array (little-endian, base 1e9). |
limbAt | int limbAt(int i) | No description in source. |
multiply | SLBigInteger multiply(SLBigInteger other) | No description in source. |
normalize | void normalize() | Trim trailing zero limbs (keep at least one). |
digitCountOf | int digitCountOf(int v) | The number of decimal digits in a nonnegative int (1 for zero). |
padLimb | String padLimb(int v) | Nine-character zero-padded decimal of a limb value 0..999999999. |
toDecimalString | String toDecimalString() | No description in source. |
SLBinomialCoefficient #sleela 2.5 (lib/math/SLBinomialCoefficient.sleela)
SLBinomialCoefficient class
Defines the SLeeLa standard-library type SLBinomialCoefficient used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compute | long compute(int n, int k) | C(n, k) by the multiplicative formula, computed to avoid overflow early. |
SLBinomialDistribution #sleela 2.5 (lib/math/SLBinomialDistribution.sleela)
SLBinomialDistribution class
Defines the SLeeLa standard-library type SLBinomialDistribution used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
pmf | double pmf(int n, int k, double p) | Probability mass C(n,k) p^k (1-p)^(n-k). |
mean | double mean(int n, double p) | No description in source. |
variance | double variance(int n, double p) | No description in source. |
SLBisectionSolver #sleela 2.5 (lib/math/SLBisectionSolver.sleela)
SLBisectionSolver class
Defines the SLeeLa standard-library type SLBisectionSolver used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
absd | double absd(double x) | No description in source. |
midpoint | double midpoint(double a, double b) | No description in source. |
half | int half(double fa, double fmid) | No description in source. |
bracketed | boolean bracketed(double fa, double fb) | No description in source. |
SLCardinality #sleela 2.5 (lib/math/SLCardinality.sleela)
SLCardinality class
Defines the SLeeLa standard-library type SLCardinality used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | int of(int[] a, int n) | No description in source. |
ofUnion | int ofUnion(int[] a, int na, int[] b, int nb) | Cardinality of the union of two distinct-valued sets. |
sameCardinality | boolean sameCardinality(int na, int nb) | No description in source. |
SLCartesianCoordinate #sleela 2.5 (lib/math/SLCartesianCoordinate.sleela)
SLCartesianCoordinate class
Defines the SLeeLa standard-library type SLCartesianCoordinate used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
x | double x | No description in source. |
y | double y | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
set | void set(double px, double py) | No description in source. |
radius | double radius() | No description in source. |
getX | double getX() | No description in source. |
getY | double getY() | No description in source. |
SLChiSquareTest #sleela 2.5 (lib/math/SLChiSquareTest.sleela)
SLChiSquareTest class
Defines the SLeeLa standard-library type SLChiSquareTest used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
statistic | double statistic(double[] observed, double[] expected, int n) | No description in source. |
degreesOfFreedom | int degreesOfFreedom(int categories) | No description in source. |
SLClamp #sleela 2.5 (lib/math/SLClamp.sleela)
SLClamp class
Defines the SLeeLa standard-library type SLClamp used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double x, double lo, double hi) | Constrain x to the closed interval [lo, hi]. |
ofInt | int ofInt(int x, int lo, int hi) | No description in source. |
inRange | boolean inRange(double x, double lo, double hi) | No description in source. |
SLCoefficient #sleela 2.5 (lib/math/SLCoefficient.sleela)
SLCoefficient class
Defines the SLeeLa standard-library type SLCoefficient used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
value | double value | No description in source. |
degree | int degree | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double v, int d) | No description in source. |
getValue | double getValue() | No description in source. |
getDegree | int getDegree() | No description in source. |
termAt | double termAt(double x) | No description in source. |
SLCombination #sleela 2.5 (lib/math/SLCombination.sleela)
SLCombination class
Defines the SLeeLa standard-library type SLCombination used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
count | long count(int n, int k) | C(n,k), the number of k-subsets of an n-set. |
SLCombinationGenerator #sleela 2.5 (lib/math/SLCombinationGenerator.sleela)
SLCombinationGenerator class
Defines the SLeeLa standard-library type SLCombinationGenerator used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
generate | int generate(int n, int k, int[] out) | No description in source. |
SLCombinatorics #sleela 2.5 (lib/math/SLCombinatorics.sleela)
SLCombinatorics class
Defines the SLeeLa standard-library type SLCombinatorics used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
factorial | long factorial(int n) | n! as a long. |
permutations | long permutations(int n, int k) | Permutations P(n,k) = n!/(n-k)! by the falling product. |
combinations | long combinations(int n, int k) | Combinations C(n,k) by the multiplicative formula. |
SLComparator #sleela 2.5 (lib/math/SLComparator.sleela)
SLComparator class
Defines the SLeeLa standard-library type SLComparator used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compareDouble | int compareDouble(double a, double b) | No description in source. |
compareInt | int compareInt(int a, int b) | No description in source. |
equalWithin | boolean equalWithin(double a, double b, double tol) | No description in source. |
SLComplex #sleela 2.5 (lib/math/SLComplex.sleela)
SLComplex class
Defines the SLeeLa standard-library type SLComplex used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
re | double re | No description in source. |
im | double im | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
set | void set(double r, double i) | No description in source. |
add | void add(SLComplex o, SLComplex out) | No description in source. |
multiply | void multiply(SLComplex o, SLComplex out) | No description in source. |
modulus | double modulus() | No description in source. |
conjugate | void conjugate(SLComplex out) | No description in source. |
getRe | double getRe() | No description in source. |
getIm | double getIm() | No description in source. |
SLConditionNumber #sleela 2.5 (lib/math/SLConditionNumber.sleela)
SLConditionNumber class
Defines the SLeeLa standard-library type SLConditionNumber used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
fromExtremes | double fromExtremes(double largest, double smallest) | No description in source. |
illConditioned | boolean illConditioned(double cond, double threshold) | No description in source. |
SLConfidenceInterval #sleela 2.5 (lib/math/SLConfidenceInterval.sleela)
SLConfidenceInterval class
Defines the SLeeLa standard-library type SLConfidenceInterval used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
ofMean | void ofMean(double mean, double stdDev, int n, double z, double[] out) | No description in source. |
marginOfError | double marginOfError(double stdDev, int n, double z) | No description in source. |
SLConfidenceLevel #sleela 2.5 (lib/math/SLConfidenceLevel.sleela)
SLConfidenceLevel class
Defines the SLeeLa standard-library type SLConfidenceLevel used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
criticalZ | double criticalZ(int percent) | No description in source. |
alpha | double alpha(int percent) | No description in source. |
SLConstant #sleela 2.5 (lib/math/SLConstant.sleela)
SLConstant class
Defines the SLeeLa standard-library type SLConstant used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
pi | double pi() | Named mathematical constants. |
e | double e() | No description in source. |
goldenRatio | double goldenRatio() | No description in source. |
sqrt2 | double sqrt2() | No description in source. |
eulerGamma | double eulerGamma() | No description in source. |
SLConstraint #sleela 2.5 (lib/math/SLConstraint.sleela)
SLConstraint class
Defines the SLeeLa standard-library type SLConstraint used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
op | int op | No description in source. |
rhs | double rhs | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int o, double r) | No description in source. |
lhs | double lhs(double[] coeffs, double[] x, int n) | No description in source. |
satisfied | boolean satisfied(double[] coeffs, double[] x, int n, double tol) | No description in source. |
SLConvergence #sleela 2.5 (lib/math/SLConvergence.sleela)
SLConvergence class
Defines the SLeeLa standard-library type SLConvergence used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
absd | double absd(double x) | No description in source. |
reached | boolean reached(double current, double previous, double tol) | Has a sequence converged: successive terms within tol? |
rate | double rate(double e0, double e1, double e2) | Linear convergence rate estimate from three successive errors. |
SLCoordinate #sleela 2.5 (lib/math/SLCoordinate.sleela)
SLCoordinate class
Defines the SLeeLa standard-library type SLCoordinate used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
components | double[] components | No description in source. |
dim | int dim | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int d) | No description in source. |
setComponent | void setComponent(int i, double v) | No description in source. |
getComponent | double getComponent(int i) | No description in source. |
getDim | int getDim() | No description in source. |
SLCoordinateDescent #sleela 2.5 (lib/math/SLCoordinateDescent.sleela)
SLCoordinateDescent class
Defines the SLeeLa standard-library type SLCoordinateDescent used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
coordinateStep | double coordinateStep(double x, double g, double h) | No description in source. |
nextCoordinate | int nextCoordinate(int current, int n) | No description in source. |
SLCorrelation #sleela 2.5 (lib/math/SLCorrelation.sleela)
SLCorrelation class
Defines the SLeeLa standard-library type SLCorrelation used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
mean | double mean(double[] xs, int n) | No description in source. |
pearson | double pearson(double[] xs, double[] ys, int n) | Pearson product-moment correlation coefficient in [-1, 1]. |
SLCorrelationMatrix #sleela 2.5 (lib/math/SLCorrelationMatrix.sleela)
SLCorrelationMatrix class
Defines the SLeeLa standard-library type SLCorrelationMatrix used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
corr | double corr(double[] data, int n, int vi, int vj) | No description in source. |
build | void build(double[] data, int m, int n, double[] out) | No description in source. |
SLCosine #sleela 2.5 (lib/math/SLCosine.sleela)
SLCosine class
Defines the SLeeLa standard-library type SLCosine used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
pi | double pi() | No description in source. |
reduce | double reduce(double x) | No description in source. |
sin | double sin(double x) | No description in source. |
cos | double cos(double x) | No description in source. |
of | double of(double x) | No description in source. |
SLCovariance #sleela 2.5 (lib/math/SLCovariance.sleela)
SLCovariance class
Defines the SLeeLa standard-library type SLCovariance used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
mean | double mean(double[] xs, int n) | No description in source. |
population | double population(double[] xs, double[] ys, int n) | Population covariance of paired samples (divides by n). |
sample | double sample(double[] xs, double[] ys, int n) | Sample covariance (divides by n-1). |
SLCovarianceMatrix #sleela 2.5 (lib/math/SLCovarianceMatrix.sleela)
SLCovarianceMatrix class
Defines the SLeeLa standard-library type SLCovarianceMatrix used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
cov | double cov(double[] data, int n, int vi, int vj) | No description in source. |
build | void build(double[] data, int m, int n, double[] out) | No description in source. |
SLCrossProduct #sleela 2.5 (lib/math/SLCrossProduct.sleela)
SLCrossProduct class
Defines the SLeeLa standard-library type SLCrossProduct used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | void of(double[] a, double[] b, double[] out) | 3D cross product a x b, written into `out` (length 3). |
of2D | double of2D(double ax, double ay, double bx, double by) | The scalar magnitude of the 2D cross product. |
SLCubicSpline #sleela 2.5 (lib/math/SLCubicSpline.sleela)
SLCubicSpline class
Defines the SLeeLa standard-library type SLCubicSpline used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
hermite | double hermite(double p0, double p1, double m0, double m1, double t) | No description in source. |
SLDataSummary #sleela 2.5 (lib/math/SLDataSummary.sleela)
SLDataSummary class
Defines the SLeeLa standard-library type SLDataSummary used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
summarize | void summarize(double[] xs, int n, double[] out) | No description in source. |
SLDerivative #sleela 2.5 (lib/math/SLDerivative.sleela)
SLDerivative class
Defines the SLeeLa standard-library type SLDerivative used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
central | double central(double[] xs, double[] ys, int i, int n) | No description in source. |
forward | double forward(double[] xs, double[] ys, int i) | Forward difference at the left endpoint. |
SLDeterminant #sleela 2.5 (lib/math/SLDeterminant.sleela)
SLDeterminant class
Defines the SLeeLa standard-library type SLDeterminant used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double[] src, int n) | Determinant of an n x n row-major matrix via Gaussian elimination on a copy. |
SLDifference #sleela 2.5 (lib/math/SLDifference.sleela)
SLDifference class
Defines the SLeeLa standard-library type SLDifference used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double a, double b) | No description in source. |
absolute | double absolute(double a, double b) | No description in source. |
forward | void forward(double[] xs, int n, double[] out) | Successive differences of a sequence written into out (length n-1). |
SLDimension #sleela 2.5 (lib/math/SLDimension.sleela)
SLDimension class
Defines the SLeeLa standard-library type SLDimension used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
value | int value | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(int d) | No description in source. |
get | int get() | No description in source. |
isScalar | boolean isScalar() | No description in source. |
isVector | boolean isVector() | No description in source. |
compatibleWith | boolean compatibleWith(SLDimension o) | No description in source. |
SLDiscreteFourier #sleela 2.5 (lib/math/SLDiscreteFourier.sleela)
SLDiscreteFourier class
Defines the SLeeLa standard-library type SLDiscreteFourier used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
reduceAngle | double reduceAngle(double x) | No description in source. |
sinv | double sinv(double x) | No description in source. |
cosv | double cosv(double x) | No description in source. |
forward | void forward(double[] signal, int n, double[] reOut, double[] imOut) | No description in source. |
SLDistance #sleela 2.5 (lib/math/SLDistance.sleela)
SLDistance class
Defines the SLeeLa standard-library type SLDistance used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
euclidean2D | double euclidean2D(double x1, double y1, double x2, double y2) | No description in source. |
euclidean3D | double euclidean3D(double x1, double y1, double z1, double x2, double y2, double z2) | No description in source. |
manhattan2D | double manhattan2D(double x1, double y1, double x2, double y2) | No description in source. |
SLDistribution #sleela 2.5 (lib/math/SLDistribution.sleela)
SLDistribution class
Defines the SLeeLa standard-library type SLDistribution used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
mean | double mean(double[] values, double[] probs, int n) | A generic discrete distribution over sampled outcome probabilities. |
variance | double variance(double[] values, double[] probs, int n) | No description in source. |
normalized | boolean normalized(double[] probs, int n, double tol) | No description in source. |
SLDivisor #sleela 2.5 (lib/math/SLDivisor.sleela)
SLDivisor class
Defines the SLeeLa standard-library type SLDivisor used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
divisorCount | int divisorCount(int n) | The number of positive divisors of n. |
divisorSum | int divisorSum(int n) | The sum of the positive divisors of n. |
divides | boolean divides(int d, int n) | No description in source. |
SLDotProduct #sleela 2.5 (lib/math/SLDotProduct.sleela)
SLDotProduct class
Defines the SLeeLa standard-library type SLDotProduct used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double[] a, double[] b, int n) | No description in source. |
SLDoubleMath #sleela 2.5 (lib/math/SLDoubleMath.sleela)
SLDoubleMath class
Defines the SLeeLa standard-library type SLDoubleMath used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
absD | double absD(double x) | No description in source. |
hypot | double hypot(double a, double b) | No description in source. |
copySign | double copySign(double mag, double sgn) | No description in source. |
SLEigenvalue #sleela 2.5 (lib/math/SLEigenvalue.sleela)
SLEigenvalue class
Defines the SLeeLa standard-library type SLEigenvalue used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
of2x2 | int of2x2(double a, double b, double c, double d, double[] out) | No description in source. |
powerIteration | double powerIteration(double[] m, int n, double[] vec, int iters) | No description in source. |
SLEigenvector #sleela 2.5 (lib/math/SLEigenvector.sleela)
SLEigenvector class
Defines the SLeeLa standard-library type SLEigenvector used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
dominant | void dominant(double[] m, int n, double[] vec, int iters) | No description in source. |
SLEquation #sleela 2.5 (lib/math/SLEquation.sleela)
SLEquation class
Defines the SLeeLa standard-library type SLEquation used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
a | double a | A linear equation a x + b = 0 with a single root. |
b | double b | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double pa, double pb) | No description in source. |
hasUniqueRoot | boolean hasUniqueRoot() | No description in source. |
root | double root() | No description in source. |
leftMinusRight | double leftMinusRight(double x) | No description in source. |
SLErrorBound #sleela 2.5 (lib/math/SLErrorBound.sleela)
SLErrorBound class
Defines the SLeeLa standard-library type SLErrorBound used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
bound | double bound | Record and widen an error bound as a computation proceeds. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
absd | double absd(double x) | No description in source. |
reset | void reset() | No description in source. |
observe | void observe(double err) | No description in source. |
getBound | double getBound() | No description in source. |
acceptable | boolean acceptable(double tol) | No description in source. |
SLExpectation #sleela 2.5 (lib/math/SLExpectation.sleela)
SLExpectation class
Defines the SLeeLa standard-library type SLExpectation used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double[] values, double[] probs, int n) | Expected value E[X] = sum(x_i * p_i); probabilities should sum to 1. |
SLExponential #sleela 2.5 (lib/math/SLExponential.sleela)
SLExponential class
Defines the SLeeLa standard-library type SLExponential used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
exp | double exp(double x) | e^x via a Taylor series; adequate for |x| within a modest range. |
e | double e() | No description in source. |
SLExpression #sleela 2.5 (lib/math/SLExpression.sleela)
SLExpression class
Defines the SLeeLa standard-library type SLExpression used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
evaluatePostfix | double evaluatePostfix(int[] ops, double[] vals, int n) | No description in source. |
SLExpressionEvaluator #sleela 2.5 (lib/math/SLExpressionEvaluator.sleela)
SLExpressionEvaluator class
Defines the SLeeLa standard-library type SLExpressionEvaluator used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
evaluate | double evaluate(int[] ops, double[] vals, int n) | Evaluate a postfix token stream (op -1 = push vals[i], 0..3 = + - * /). |
SLExpressionTree #sleela 2.5 (lib/math/SLExpressionTree.sleela)
SLExpressionTree class
Defines the SLeeLa standard-library type SLExpressionTree used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
evaluate | double evaluate(int[] kind, double[] val, int[] left, int[] right, int node) | No description in source. |
SLFactor #sleela 2.5 (lib/math/SLFactor.sleela)
SLFactor class
Defines the SLeeLa standard-library type SLFactor used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
root | double root | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double r) | No description in source. |
evaluate | double evaluate(double x) | No description in source. |
getRoot | double getRoot() | No description in source. |
SLFactorial #sleela 2.5 (lib/math/SLFactorial.sleela)
SLFactorial class
Defines the SLeeLa standard-library type SLFactorial used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compute | long compute(int n) | Factorial n! for nonnegative n, as a 64-bit long (exact through 20!). |
falling | long falling(int n, int k) | Falling factorial n*(n-1)*...*(n-k+1). |
SLFastFourier #sleela 2.5 (lib/math/SLFastFourier.sleela)
SLFastFourier class
Defines the SLeeLa standard-library type SLFastFourier used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
reduceAngle | double reduceAngle(double x) | No description in source. |
sinv | double sinv(double x) | No description in source. |
cosv | double cosv(double x) | No description in source. |
isPowerOfTwo | boolean isPowerOfTwo(int n) | No description in source. |
transform | void transform(double[] re, double[] im, int n) | No description in source. |
SLFibonacci #sleela 2.5 (lib/math/SLFibonacci.sleela)
SLFibonacci class
Defines the SLeeLa standard-library type SLFibonacci used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compute | long compute(int n) | The n-th Fibonacci number (F0 = 0, F1 = 1), computed iteratively. |
isFibonacci | boolean isFibonacci(long v) | No description in source. |
SLFiniteSet #sleela 2.5 (lib/math/SLFiniteSet.sleela)
SLFiniteSet class
Defines the SLeeLa standard-library type SLFiniteSet used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
members | int[] members | No description in source. |
size | int size | No description in source. |
capacity | int capacity | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int cap) | No description in source. |
contains | boolean contains(int v) | No description in source. |
add | boolean add(int v) | No description in source. |
cardinality | int cardinality() | No description in source. |
SLFixedPoint #sleela 2.5 (lib/math/SLFixedPoint.sleela)
SLFixedPoint class
Defines the SLeeLa standard-library type SLFixedPoint used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
fracBits | int fracBits | No description in source. |
raw | long raw | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int bits) | No description in source. |
fromDouble | void fromDouble(double x) | No description in source. |
toDouble | double toDouble() | No description in source. |
getRaw | long getRaw() | No description in source. |
SLFloatMath #sleela 2.5 (lib/math/SLFloatMath.sleela)
SLFloatMath class
Defines the SLeeLa standard-library type SLFloatMath used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
absF | double absF(double x) | No description in source. |
epsilon | double epsilon() | Smallest resolvable gap near 1.0 for single precision. |
roundTo | double roundTo(double x, int places) | No description in source. |
SLFormula #sleela 2.5 (lib/math/SLFormula.sleela)
SLFormula class
Defines the SLeeLa standard-library type SLFormula used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
label | String label | A named formula stored as a postfix token stream plus a human label. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
name | void name(String l) | No description in source. |
formulaName | String formulaName() | No description in source. |
evaluate | double evaluate(int[] ops, double[] vals, int n) | No description in source. |
SLFormulaParser #sleela 2.5 (lib/math/SLFormulaParser.sleela)
SLFormulaParser class
Defines the SLeeLa standard-library type SLFormulaParser used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
tokenCount | int tokenCount | No description in source. |
operandCount | int operandCount | No description in source. |
operatorCount | int operatorCount | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
parse | void parse(String text, int length, int[] codes) | No description in source. |
charCodeAt | int charCodeAt(String s, int i) | No description in source. |
getTokenCount | int getTokenCount() | No description in source. |
SLFormulaSimplifier #sleela 2.5 (lib/math/SLFormulaSimplifier.sleela)
SLFormulaSimplifier class
Defines the SLeeLa standard-library type SLFormulaSimplifier used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
simplifyLinear | void simplifyLinear(double a, double b, double[] out) | No description in source. |
isIdentityMultiplier | boolean isIdentityMultiplier(double a) | No description in source. |
isAnnihilator | boolean isAnnihilator(double a) | No description in source. |
SLFourier #sleela 2.5 (lib/math/SLFourier.sleela)
SLFourier class
Defines the SLeeLa standard-library type SLFourier used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
reduceAngle | double reduceAngle(double x) | No description in source. |
sinv | double sinv(double x) | No description in source. |
cosv | double cosv(double x) | No description in source. |
magnitude | void magnitude(double[] signal, int n, double[] magOut) | Magnitude spectrum of a real signal via the DFT: mag[k] = |X[k]|. |
SLFourierSeries #sleela 2.5 (lib/math/SLFourierSeries.sleela)
SLFourierSeries class
Defines the SLeeLa standard-library type SLFourierSeries used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
reduceAngle | double reduceAngle(double x) | No description in source. |
sinv | double sinv(double x) | No description in source. |
cosv | double cosv(double x) | No description in source. |
evaluate | double evaluate(double a0, double[] a, double[] b, int terms, double x) | No description in source. |
SLFunction #sleela 2.5 (lib/math/SLFunction.sleela)
SLFunction class
Defines the SLeeLa standard-library type SLFunction used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
evaluate | double evaluate(double[] xs, double[] ys, int n, double x) | No description in source. |
SLGcd #sleela 2.5 (lib/math/SLGcd.sleela)
SLGcd class
Defines the SLeeLa standard-library type SLGcd used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compute | int compute(int a, int b) | Greatest common divisor by the Euclidean algorithm. |
coprime | boolean coprime(int a, int b) | No description in source. |
SLGeometry #sleela 2.5 (lib/math/SLGeometry.sleela)
SLGeometry class
Defines the SLeeLa standard-library type SLGeometry used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
triangleArea | double triangleArea(double x1, double y1, double x2, double y2, double x3, double y3) | No description in source. |
circleArea | double circleArea(double r) | No description in source. |
circleCircumference | double circleCircumference(double r) | No description in source. |
polygonPerimeter | double polygonPerimeter(double[] xs, double[] ys, int n) | No description in source. |
polygonArea | double polygonArea(double[] xs, double[] ys, int n) | Signed polygon area via the shoelace formula (absolute value returned). |
SLGradient #sleela 2.5 (lib/math/SLGradient.sleela)
SLGradient class
Defines the SLeeLa standard-library type SLGradient used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compute | void compute(double[] fPlus, double[] fMinus, int dims, double h, double[] out) | No description in source. |
SLGradientDescent #sleela 2.5 (lib/math/SLGradientDescent.sleela)
SLGradientDescent class
Defines the SLeeLa standard-library type SLGradientDescent used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
step | void step(double[] x, double[] grad, double rate, int n) | One gradient-descent parameter update x := x - rate * grad, elementwise. |
scalarStep | double scalarStep(double x, double grad, double rate) | No description in source. |
SLGradientField #sleela 2.5 (lib/math/SLGradientField.sleela)
SLGradientField class
Defines the SLeeLa standard-library type SLGradientField used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
w | int w | No description in source. |
h | int h | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int width, int height) | No description in source. |
gradientAt | void gradientAt(double[] f, int x, int y, double spacing, double[] out) | No description in source. |
SLGraph #sleela 2.5 (lib/math/SLGraph.sleela)
SLGraph class
Defines the SLeeLa standard-library type SLGraph used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
n | int n | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int size) | No description in source. |
reachableCount | int reachableCount(double[] adj, int source) | No description in source. |
connected | boolean connected(double[] adj) | No description in source. |
SLGraphEdge #sleela 2.5 (lib/math/SLGraphEdge.sleela)
SLGraphEdge class
Defines the SLeeLa standard-library type SLGraphEdge used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
from | int from | No description in source. |
to | int to | No description in source. |
weight | double weight | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(int u, int v, double w) | No description in source. |
getFrom | int getFrom() | No description in source. |
getTo | int getTo() | No description in source. |
getWeight | double getWeight() | No description in source. |
connects | boolean connects(int a, int b) | No description in source. |
SLGraphNode #sleela 2.5 (lib/math/SLGraphNode.sleela)
SLGraphNode class
Defines the SLeeLa standard-library type SLGraphNode used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
id | int id | No description in source. |
degree | int degree | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int nodeId) | No description in source. |
incrementDegree | void incrementDegree() | No description in source. |
getId | int getId() | No description in source. |
getDegree | int getDegree() | No description in source. |
SLHessian #sleela 2.5 (lib/math/SLHessian.sleela)
SLHessian class
Defines the SLeeLa standard-library type SLHessian used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
build | void build(double fxx, double fyy, double fxy, double[] out) | No description in source. |
determinant | double determinant(double fxx, double fyy, double fxy) | No description in source. |
classify | int classify(double fxx, double fyy, double fxy) | No description in source. |
SLHistogram #sleela 2.5 (lib/math/SLHistogram.sleela)
SLHistogram class
Defines the SLeeLa standard-library type SLHistogram used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
build | void build(double[] xs, int n, double lo, double hi, int bins, int[] out) | No description in source. |
SLHypothesisTest #sleela 2.5 (lib/math/SLHypothesisTest.sleela)
SLHypothesisTest class
Defines the SLeeLa standard-library type SLHypothesisTest used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
zStatistic | double zStatistic(double sampleMean, double mu0, double sigma, int n) | No description in source. |
rejectTwoSided | boolean rejectTwoSided(double z, double critical) | No description in source. |
SLInequality #sleela 2.5 (lib/math/SLInequality.sleela)
SLInequality class
Defines the SLeeLa standard-library type SLInequality used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
a | double a | No description in source. |
b | double b | No description in source. |
op | int op | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double pa, double pb, int o) | No description in source. |
satisfies | boolean satisfies(double x) | No description in source. |
SLInfiniteSet #sleela 2.5 (lib/math/SLInfiniteSet.sleela)
SLInfiniteSet class
Defines the SLeeLa standard-library type SLInfiniteSet used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
kind | int kind | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int k) | No description in source. |
contains | boolean contains(int v) | No description in source. |
countable | boolean countable() | No description in source. |
SLIntegerMath #sleela 2.5 (lib/math/SLIntegerMath.sleela)
SLIntegerMath class
Defines the SLeeLa standard-library type SLIntegerMath used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
add | long add(long a, long b) | No description in source. |
multiply | long multiply(long a, long b) | No description in source. |
gcd | long gcd(long a, long b) | No description in source. |
pow | long pow(long base, int exp) | No description in source. |
isEven | boolean isEven(long v) | No description in source. |
SLIntegral #sleela 2.5 (lib/math/SLIntegral.sleela)
SLIntegral class
Defines the SLeeLa standard-library type SLIntegral used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
trapezoid | double trapezoid(double[] xs, double[] ys, int n) | Definite integral of a sampled function by the trapezoidal rule. |
SLInterpolation #sleela 2.5 (lib/math/SLInterpolation.sleela)
SLInterpolation class
Defines the SLeeLa standard-library type SLInterpolation used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
linear | double linear(double x0, double y0, double x1, double y1, double x) | Linear interpolation between (x0,y0) and (x1,y1) at x. |
lerp | double lerp(double a, double b, double t) | Normalized linear blend: (1-t)*a + t*b. |
SLInterpolationTable #sleela 2.5 (lib/math/SLInterpolationTable.sleela)
SLInterpolationTable class
Defines the SLeeLa standard-library type SLInterpolationTable used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
rows | int rows | A sorted table lookup with linear interpolation between bracketing rows. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
setRows | void setRows(int r) | No description in source. |
getRows | int getRows() | No description in source. |
lookup | double lookup(double[] xs, double[] ys, int n, double x) | No description in source. |
SLIntersection #sleela 2.5 (lib/math/SLIntersection.sleela)
SLIntersection class
Defines the SLeeLa standard-library type SLIntersection used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
contains | boolean contains(int[] a, int na, int v) | No description in source. |
of | int of(int[] a, int na, int[] b, int nb, int[] out) | No description in source. |
SLInterval #sleela 2.5 (lib/math/SLInterval.sleela)
SLInterval class
Defines the SLeeLa standard-library type SLInterval used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
lo | double lo | No description in source. |
hi | double hi | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double a, double b) | No description in source. |
contains | boolean contains(double x) | No description in source. |
width | double width() | No description in source. |
midpoint | double midpoint() | No description in source. |
overlaps | boolean overlaps(SLInterval o) | No description in source. |
SLIntervalArithmetic #sleela 2.5 (lib/math/SLIntervalArithmetic.sleela)
SLIntervalArithmetic class
Defines the SLeeLa standard-library type SLIntervalArithmetic used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
add | void add(double aLo, double aHi, double bLo, double bHi, double[] out) | No description in source. |
multiply | void multiply(double aLo, double aHi, double bLo, double bHi, double[] out) | No description in source. |
SLInverse #sleela 2.5 (lib/math/SLInverse.sleela)
SLInverse class
Defines the SLeeLa standard-library type SLInverse used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | boolean of(double[] src, double[] inv, int n) | No description in source. |
SLIteration #sleela 2.5 (lib/math/SLIteration.sleela)
SLIteration class
Defines the SLeeLa standard-library type SLIteration used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
count | int count | No description in source. |
limit | int limit | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int maxIterations) | No description in source. |
next | boolean next() | No description in source. |
getCount | int getCount() | No description in source. |
resetCount | void resetCount() | No description in source. |
SLJacobian #sleela 2.5 (lib/math/SLJacobian.sleela)
SLJacobian class
Defines the SLeeLa standard-library type SLJacobian used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
build | void build(double[] fPlus, double[] fMinus, int m, int n, double h, double[] out) | No description in source. |
SLKurtosis #sleela 2.5 (lib/math/SLKurtosis.sleela)
SLKurtosis class
Defines the SLeeLa standard-library type SLKurtosis used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
mean | double mean(double[] xs, int n) | No description in source. |
of | double of(double[] xs, int n) | Excess kurtosis: m4 / m2^2 - 3. |
SLLagrangeInterpolation #sleela 2.5 (lib/math/SLLagrangeInterpolation.sleela)
SLLagrangeInterpolation class
Defines the SLeeLa standard-library type SLLagrangeInterpolation used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
evaluate | double evaluate(double[] xs, double[] ys, int n, double x) | Lagrange interpolating polynomial evaluated at x, through n sample points. |
SLLambda #sleela 2.5 (lib/math/SLLambda.sleela)
SLLambda class
Defines the SLeeLa standard-library type SLLambda used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
scale | double scale | An affine lambda x -> scale*x + offset; compose combines two lambdas. |
offset | double offset | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double s, double o) | No description in source. |
apply | double apply(double x) | No description in source. |
composeAfter | void composeAfter(SLLambda g, SLLambda out) | Compose this after g (this(g(x))), writing the result lambda into out. |
SLLaplace #sleela 2.5 (lib/math/SLLaplace.sleela)
SLLaplace class
Defines the SLeeLa standard-library type SLLaplace used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
reduceAngle | double reduceAngle(double x) | No description in source. |
sinv | double sinv(double x) | No description in source. |
cosv | double cosv(double x) | No description in source. |
expNeg | double expNeg(double x) | No description in source. |
transform | double transform(double[] f, int n, double dt, double s) | No description in source. |
SLLcm #sleela 2.5 (lib/math/SLLcm.sleela)
SLLcm class
Defines the SLeeLa standard-library type SLLcm used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gcd | int gcd(int a, int b) | Least common multiple via gcd: lcm(a,b) = |a*b| / gcd(a,b). |
compute | int compute(int a, int b) | No description in source. |
SLLeastSquares #sleela 2.5 (lib/math/SLLeastSquares.sleela)
SLLeastSquares class
Defines the SLeeLa standard-library type SLLeastSquares used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
fit | void fit(double[] xs, double[] ys, int n, double[] out) | No description in source. |
SLLimit #sleela 2.5 (lib/math/SLLimit.sleela)
SLLimit class
Defines the SLeeLa standard-library type SLLimit used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
estimate | double estimate(double[] samples, int n) | No description in source. |
converging | boolean converging(double[] samples, int n, double tol) | No description in source. |
SLLine #sleela 2.5 (lib/math/SLLine.sleela)
SLLine class
Defines the SLeeLa standard-library type SLLine used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
slope | double slope | A line in slope-intercept form y = m x + b, with a vertical flag. |
intercept | double intercept | No description in source. |
vertical | boolean vertical | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
fromPoints | void fromPoints(double x1, double y1, double x2, double y2) | No description in source. |
at | double at(double x) | No description in source. |
parallelTo | boolean parallelTo(SLLine o) | No description in source. |
getSlope | double getSlope() | No description in source. |
SLLinearAlgebra #sleela 2.5 (lib/math/SLLinearAlgebra.sleela)
SLLinearAlgebra class
Defines the SLeeLa standard-library type SLLinearAlgebra used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
matVec | void matVec(double[] a, double[] x, double[] y, int r, int c) | Matrix-vector product y = A(r x c) * x. |
trace | double trace(double[] a, int n) | Trace of an n x n matrix (sum of the diagonal). |
SLLinearProgram #sleela 2.5 (lib/math/SLLinearProgram.sleela)
SLLinearProgram class
Defines the SLeeLa standard-library type SLLinearProgram used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
objective | double objective(double[] c, double[] x, int n) | No description in source. |
feasible | boolean feasible(double[] a, double[] b, double[] x, int m, int n, double tol) | Feasible if A x <= b for all m rows (A row-major m x n). |
SLLinearRegression #sleela 2.5 (lib/math/SLLinearRegression.sleela)
SLLinearRegression class
Defines the SLeeLa standard-library type SLLinearRegression used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
slope | double slope | No description in source. |
intercept | double intercept | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
fit | void fit(double[] xs, double[] ys, int n) | No description in source. |
predict | double predict(double x) | No description in source. |
getSlope | double getSlope() | No description in source. |
getIntercept | double getIntercept() | No description in source. |
SLLogarithm #sleela 2.5 (lib/math/SLLogarithm.sleela)
SLLogarithm class
Defines the SLeeLa standard-library type SLLogarithm used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
ln | double ln(double x) | No description in source. |
logBase | double logBase(double x, double b) | Logarithm of x in an arbitrary base b: ln(x)/ln(b). |
SLLongMath #sleela 2.5 (lib/math/SLLongMath.sleela)
SLLongMath class
Defines the SLeeLa standard-library type SLLongMath used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
maxVal | long maxVal() | No description in source. |
clampAdd | long clampAdd(long a, long b) | No description in source. |
absL | long absL(long v) | No description in source. |
sign | long sign(long v) | No description in source. |
SLLTangent #sleela 2.5 (lib/math/SLLTangent.sleela)
SLLTangent class
Defines the SLeeLa standard-library type SLLTangent used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
slope | double slope | A line tangent to a curve at a point: slope m through (x0, y0). |
x0 | double x0 | No description in source. |
y0 | double y0 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double m, double px, double py) | No description in source. |
at | double at(double x) | Evaluate the tangent line y = y0 + m (x - x0). |
getSlope | double getSlope() | No description in source. |
SLMachineEpsilon #sleela 2.5 (lib/math/SLMachineEpsilon.sleela)
SLMachineEpsilon class
Defines the SLeeLa standard-library type SLMachineEpsilon used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compute | double compute() | Compute machine epsilon for double precision by halving until 1 + e == 1. |
doubleValue | double doubleValue() | No description in source. |
SLMarkovChain #sleela 2.5 (lib/math/SLMarkovChain.sleela)
SLMarkovChain class
Defines the SLeeLa standard-library type SLMarkovChain used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
n | int n | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int states) | No description in source. |
step | void step(double[] dist, double[] p, double[] out) | No description in source. |
rowStochastic | boolean rowStochastic(double[] p, double tol) | No description in source. |
SLMath #sleela 2.5 (lib/math/SLMath.sleela)
SLMath class
Defines the SLeeLa standard-library type SLMath used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
pi | double pi() | No description in source. |
e | double e() | No description in source. |
absD | double absD(double x) | No description in source. |
maxD | double maxD(double a, double b) | No description in source. |
minD | double minD(double a, double b) | No description in source. |
hypot | double hypot(double a, double b) | No description in source. |
SLMathContext #sleela 2.5 (lib/math/SLMathContext.sleela)
SLMathContext class
Defines the SLeeLa standard-library type SLMathContext used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
precision | int precision | No description in source. |
roundingMode | int roundingMode | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int digits, int mode) | No description in source. |
getPrecision | int getPrecision() | No description in source. |
getRoundingMode | int getRoundingMode() | No description in source. |
round | double round(double x) | No description in source. |
SLMathEngine #sleela 2.5 (lib/math/SLMathEngine.sleela)
SLMathEngine class
Defines the SLeeLa standard-library type SLMathEngine used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
apply | double apply(int op, double a, double b) | No description in source. |
SLMathEvaluator #sleela 2.5 (lib/math/SLMathEvaluator.sleela)
SLMathEvaluator class
Defines the SLeeLa standard-library type SLMathEvaluator used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
evaluate | double evaluate(int[] ops, double[] vals, int n) | Evaluate a postfix token stream (op -1 pushes vals[i], 0..3 = + - * /). |
SLMathNorms #sleela 2.5 (lib/math/SLMathNorms.sleela)
SLMathNorms class
SLMathNorms carries the math precision norms for SLeeLa -- how many digits are carried for irrational constants, repeating decimals, and Finance Verbs. The authoritative, user-editable values live in lib/math/MATH.PRECISION.NORMS.md and lib/math/math-precision-norms.json; these compiled constants are the baseline a build starts from when no config file is read.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
DEFAULT_IRRATIONAL_CARRY | static final int DEFAULT_IRRATIONAL_CARRY = 2048 | No description in source. |
DEFAULT_REPEATING_CARRY | static final int DEFAULT_REPEATING_CARRY = 58 | No description in source. |
DEFAULT_FINANCE_CARRY | static final int DEFAULT_FINANCE_CARRY = 1023 | No description in source. |
FINANCE_CARRY_FLOOR | static final int FINANCE_CARRY_FLOOR = 1023 | The hard floor below which a Finance Verb must not be configured. |
irrationalCarry | int irrationalCarry | Live values, seeded from the defaults, overridable at runtime via setters. |
repeatingCarry | int repeatingCarry | No description in source. |
financeCarry | int financeCarry | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
initDefaults | void initDefaults() | Start from the compiled defaults. |
getIrrationalCarry | int getIrrationalCarry() | No description in source. |
getRepeatingCarry | int getRepeatingCarry() | No description in source. |
getFinanceCarry | int getFinanceCarry() | No description in source. |
setIrrationalCarry | void setIrrationalCarry(int v) | No description in source. |
setRepeatingCarry | void setRepeatingCarry(int v) | No description in source. |
setFinanceCarry | boolean setFinanceCarry(int v) | No description in source. |
financeCarryValid | boolean financeCarryValid() | Is the current finance carry valid (at or above the floor)? |
financeFloor | int financeFloor() | The hard floor for finance carry, reachable without instance-static access. |
available | boolean available() | No description in source. |
SLMatrix #sleela 2.5 (lib/math/SLMatrix.sleela)
SLMatrix class
Defines the SLeeLa standard-library type SLMatrix used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
rows | int rows | Row-major dense matrix stored as a flat double[] of length rows*cols. |
cols | int cols | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
shape | void shape(int r, int c) | No description in source. |
at | double at(double[] m, int r, int c) | No description in source. |
put | void put(double[] m, int r, int c, double v) | No description in source. |
getRows | int getRows() | No description in source. |
getCols | int getCols() | No description in source. |
identity | void identity(double[] m, int n) | Identity matrix of order n written into `m`. |
SLMatrixOperations #sleela 2.5 (lib/math/SLMatrixOperations.sleela)
SLMatrixOperations class
Defines the SLeeLa standard-library type SLMatrixOperations used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
multiply | void multiply(double[] a, double[] b, double[] c, int ra, int ca, int cb) | Matrix product C = A(ra x ca) * B(ca x cb), all row-major flat arrays. |
add | void add(double[] a, double[] b, double[] c, int r, int cc) | Elementwise sum C = A + B for r x c matrices. |
scale | void scale(double[] a, double s, double[] c, int r, int cc) | Scalar multiply. |
SLMax #sleela 2.5 (lib/math/SLMax.sleela)
SLMax class
Defines the SLeeLa standard-library type SLMax used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double a, double b) | No description in source. |
ofInt | int ofInt(int a, int b) | No description in source. |
ofArray | double ofArray(double[] xs, int n) | No description in source. |
SLMean #sleela 2.5 (lib/math/SLMean.sleela)
SLMean class
Defines the SLeeLa standard-library type SLMean used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
arithmetic | double arithmetic(double[] xs, int n) | Arithmetic mean of the first n elements. |
harmonic | double harmonic(double[] xs, int n) | Harmonic mean (all elements must be nonzero). |
SLMedian #sleela 2.5 (lib/math/SLMedian.sleela)
SLMedian class
Defines the SLeeLa standard-library type SLMedian used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double[] a, int n) | Median of a copy of the data (values are sorted in place in `a`). |
sortInPlace | void sortInPlace(double[] a, int n) | No description in source. |
SLMetric #sleela 2.5 (lib/math/SLMetric.sleela)
SLMetric class
Defines the SLeeLa standard-library type SLMetric used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
euclidean | double euclidean(double[] a, double[] b, int n) | Distance metrics between two n-vectors: Euclidean, Manhattan, Chebyshev. |
manhattan | double manhattan(double[] a, double[] b, int n) | No description in source. |
chebyshev | double chebyshev(double[] a, double[] b, int n) | No description in source. |
SLMin #sleela 2.5 (lib/math/SLMin.sleela)
SLMin class
Defines the SLeeLa standard-library type SLMin used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double a, double b) | No description in source. |
ofInt | int ofInt(int a, int b) | No description in source. |
ofArray | double ofArray(double[] xs, int n) | No description in source. |
SLMode #sleela 2.5 (lib/math/SLMode.sleela)
SLMode class
Defines the SLeeLa standard-library type SLMode used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double[] xs, int n) | The most frequent value (first-seen wins on ties). O(n^2), copy-free. |
SLModulo #sleela 2.5 (lib/math/SLModulo.sleela)
SLModulo class
Defines the SLeeLa standard-library type SLModulo used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
mod | int mod(int a, int m) | Euclidean remainder that is always in [0, m) for positive m. |
powMod | long powMod(long base, long exp, long m) | Modular exponentiation of base to the power exp, modulo m, for nonnegative exp. |
SLMoment #sleela 2.5 (lib/math/SLMoment.sleela)
SLMoment class
Defines the SLeeLa standard-library type SLMoment used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
mean | double mean(double[] xs, int n) | No description in source. |
raw | double raw(double[] xs, int n, int k) | The k-th raw moment about the origin: E[X^k]. |
central | double central(double[] xs, int n, int k) | The k-th central moment about the mean. |
SLMonteCarlo #sleela 2.5 (lib/math/SLMonteCarlo.sleela)
SLMonteCarlo class
Defines the SLeeLa standard-library type SLMonteCarlo used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
estimate | double estimate(double[] samples, int n) | No description in source. |
estimatePi | double estimatePi(int inside, int n) | No description in source. |
SLMonteCarloSampler #sleela 2.5 (lib/math/SLMonteCarloSampler.sleela)
SLMonteCarloSampler class
Defines the SLeeLa standard-library type SLMonteCarloSampler used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
state | long state | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
seed | void seed(long s) | No description in source. |
nextUniform | double nextUniform(double a, double b) | No description in source. |
sample | void sample(double a, double b, int n, double[] out) | No description in source. |
SLNewtonInterpolation #sleela 2.5 (lib/math/SLNewtonInterpolation.sleela)
SLNewtonInterpolation class
Defines the SLeeLa standard-library type SLNewtonInterpolation used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
evaluate | double evaluate(double[] xs, double[] ysIn, int n, double x) | No description in source. |
SLNewtonMethod #sleela 2.5 (lib/math/SLNewtonMethod.sleela)
SLNewtonMethod class
Defines the SLeeLa standard-library type SLNewtonMethod used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
step | double step(double x, double fx, double dfx) | One Newton-Raphson update step: x minus f(x) divided by its derivative. |
SLNewtonOptimization #sleela 2.5 (lib/math/SLNewtonOptimization.sleela)
SLNewtonOptimization class
Defines the SLeeLa standard-library type SLNewtonOptimization used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
step | double step(double x, double gradient, double hessian) | No description in source. |
isMinimum | boolean isMinimum(double hessian) | No description in source. |
SLNewtonSolver #sleela 2.5 (lib/math/SLNewtonSolver.sleela)
SLNewtonSolver class
Defines the SLeeLa standard-library type SLNewtonSolver used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
step | double step(double x, double fx, double dfx) | One Newton-Raphson update step toward a root of f. |
converged | boolean converged(double xNew, double xOld, double tol) | Has the iterate converged within tol? |
SLNormalDistribution #sleela 2.5 (lib/math/SLNormalDistribution.sleela)
SLNormalDistribution class
Defines the SLeeLa standard-library type SLNormalDistribution used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
mean | double mean | No description in source. |
stdDev | double stdDev | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
expf | double expf(double x) | No description in source. |
configure | void configure(double m, double s) | No description in source. |
pdf | double pdf(double x) | No description in source. |
cdf | double cdf(double x) | No description in source. |
SLNumber #sleela 2.5 (lib/math/SLNumber.sleela)
SLNumber class
Defines the SLeeLa standard-library type SLNumber used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
kind | int kind | A tagged numeric value: kind 0 = integer (long), 1 = real (double). |
ival | long ival | No description in source. |
dval | double dval | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
setInt | void setInt(long v) | No description in source. |
setReal | void setReal(double v) | No description in source. |
asDouble | double asDouble() | No description in source. |
isInteger | boolean isInteger() | No description in source. |
SLNumeric #sleela 2.5 (lib/math/SLNumeric.sleela)
SLNumeric class
Defines the SLeeLa standard-library type SLNumeric used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
value | double value | A numeric wrapper exposing common predicates over a double value. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double v) | No description in source. |
get | double get() | No description in source. |
isZero | boolean isZero() | No description in source. |
isPositive | boolean isPositive() | No description in source. |
isNegative | boolean isNegative() | No description in source. |
isInteger | boolean isInteger() | No description in source. |
SLNumericalDerivative #sleela 2.5 (lib/math/SLNumericalDerivative.sleela)
SLNumericalDerivative class
Defines the SLeeLa standard-library type SLNumericalDerivative used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
derivative | double derivative(double yPrev, double yNext, double h) | Three-point central difference using a step h about sampled triplet. |
secondDerivative | double secondDerivative(double yPrev, double yMid, double yNext, double h) | Second derivative via the standard three-point stencil. |
SLNumericalIntegration #sleela 2.5 (lib/math/SLNumericalIntegration.sleela)
SLNumericalIntegration class
Defines the SLeeLa standard-library type SLNumericalIntegration used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
trapezoid | double trapezoid(double[] ys, double a, double b, int n) | No description in source. |
simpson | double simpson(double[] ys, double a, double b, int n) | Composite Simpson rule (n must be even), sampled ys length n+1. |
SLNumericalMath #sleela 2.5 (lib/math/SLNumericalMath.sleela)
SLNumericalMath class
Defines the SLeeLa standard-library type SLNumericalMath used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
chop | double chop(double x, double tol) | Clamp tiny magnitudes to zero below a threshold (denormal flush). |
nearlyEqual | boolean nearlyEqual(double a, double b, double tol) | No description in source. |
SLNumericalPrecision #sleela 2.5 (lib/math/SLNumericalPrecision.sleela)
SLNumericalPrecision class
Defines the SLeeLa standard-library type SLNumericalPrecision used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
doubleEpsilon | double doubleEpsilon() | No description in source. |
nearlyEqual | boolean nearlyEqual(double a, double b, double relTol) | No description in source. |
SLNumericalRoot #sleela 2.5 (lib/math/SLNumericalRoot.sleela)
SLNumericalRoot class
Defines the SLeeLa standard-library type SLNumericalRoot used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
absd | double absd(double x) | No description in source. |
bracketed | boolean bracketed(double fa, double fb) | No description in source. |
bisect | double bisect(double a, double b) | No description in source. |
within | boolean within(double fx, double tol) | No description in source. |
SLNumericalSequence #sleela 2.5 (lib/math/SLNumericalSequence.sleela)
SLNumericalSequence class
Defines the SLeeLa standard-library type SLNumericalSequence used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
linspace | void linspace(double a, double b, int n, double[] out) | Build a linearly spaced sequence of n points from a to b into out. |
geomspace | void geomspace(double a, double r, int n, double[] out) | Build a geometric sequence a, a*r, a*r^2, ... into out. |
SLNumericalSolver #sleela 2.5 (lib/math/SLNumericalSolver.sleela)
SLNumericalSolver class
Defines the SLeeLa standard-library type SLNumericalSolver used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
solveLinear | boolean solveLinear(double[] aIn, double[] bIn, double[] x, int n) | No description in source. |
SLNumericFormatter #sleela 2.5 (lib/math/SLNumericFormatter.sleela)
SLNumericFormatter class
Defines the SLeeLa standard-library type SLNumericFormatter used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_PLACES | int MAX_PLACES = 15 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
integerPart | long integerPart(double x) | No description in source. |
fractionalDigits | long fractionalDigits(double x, int places) | The first `places` fractional digits of |x|, as an integer (rounded). |
pow10 | double pow10(int n) | 10^n as a double, for 0 <= n <= 18. |
digitChar | String digitChar(long d) | The decimal digit 0..9 as a one-character String. |
unsignedToString | String unsignedToString(long d) | A nonnegative long as its decimal String (no sign). |
longToString | String longToString(long d) | A signed long as its decimal String. |
toFixed | String toFixed(double x, int places) | No description in source. |
stringDigitCount | int stringDigitCount(long d) | The number of decimal digits in a nonnegative long (1 for zero). |
toSignificant | String toSignificant(double x, int sig) | No description in source. |
SLNumericParser #sleela 2.5 (lib/math/SLNumericParser.sleela)
SLNumericParser class
Defines the SLeeLa standard-library type SLNumericParser used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
parseUnsigned | long parseUnsigned(int[] codes, int length) | No description in source. |
SLObjective #sleela 2.5 (lib/math/SLObjective.sleela)
SLObjective class
Defines the SLeeLa standard-library type SLObjective used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
a | double a | No description in source. |
b | double b | No description in source. |
c | double c | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double pa, double pb, double pc) | No description in source. |
value | double value(double x) | No description in source. |
gradient | double gradient(double x) | No description in source. |
minimizer | double minimizer() | No description in source. |
SLODESolver #sleela 2.5 (lib/math/SLODESolver.sleela)
SLODESolver class
Defines the SLeeLa standard-library type SLODESolver used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
eulerStep | double eulerStep(double y, double fval, double h) | No description in source. |
heunStep | double heunStep(double y, double k1, double k2, double h) | No description in source. |
SLOptimization #sleela 2.5 (lib/math/SLOptimization.sleela)
SLOptimization class
Defines the SLeeLa standard-library type SLOptimization used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
argMin | int argMin(double[] values, int n) | No description in source. |
converged | boolean converged(double fNew, double fOld, double tol) | No description in source. |
SLOptimizationProblem #sleela 2.5 (lib/math/SLOptimizationProblem.sleela)
SLOptimizationProblem class
Defines the SLeeLa standard-library type SLOptimizationProblem used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
minimize | boolean minimize | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(boolean doMinimize) | No description in source. |
bestIndex | int bestIndex(double[] objective, int n) | No description in source. |
SLOrder #sleela 2.5 (lib/math/SLOrder.sleela)
SLOrder class
Defines the SLeeLa standard-library type SLOrder used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compare | int compare(double a, double b) | Comparison yielding -1, 0, or 1. |
ascending | boolean ascending(double[] a, int n) | Is the array sorted ascending? |
SLOrdinaryDifferentialEquation #sleela 2.5 (lib/math/SLOrdinaryDifferentialEquation.sleela)
SLOrdinaryDifferentialEquation class
Defines the SLeeLa standard-library type SLOrdinaryDifferentialEquation used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
a | double a | No description in source. |
b | double b | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double pa, double pb) | No description in source. |
slope | double slope(double y) | No description in source. |
eulerStep | double eulerStep(double y, double h) | No description in source. |
SLOverflow #sleela 2.5 (lib/math/SLOverflow.sleela)
SLOverflow class
Defines the SLeeLa standard-library type SLOverflow used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
maxLong | long maxLong() | No description in source. |
addOverflows | boolean addOverflows(long a, long b) | No description in source. |
mulOverflows | boolean mulOverflows(long a, long b) | Would a * b overflow? Checked by dividing the product back out. |
exceedsDouble | boolean exceedsDouble(double x, double limit) | No description in source. |
SLPackage #sleela 2.5 (lib/math/SLPackage.sleela)
SLPackage class
Defines the SLeeLa standard-library package for math.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
packageName | String packageName | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name) | No description in source. |
name | String name() | No description in source. |
available | boolean available() | No description in source. |
SLPartialDerivative #sleela 2.5 (lib/math/SLPartialDerivative.sleela)
SLPartialDerivative class
Defines the SLeeLa standard-library type SLPartialDerivative used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
along | double along(double fMinus, double fPlus, double h) | No description in source. |
SLPathLength #sleela 2.5 (lib/math/SLPathLength.sleela)
SLPathLength class
Defines the SLeeLa standard-library type SLPathLength used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
of | double of(double[] xs, double[] ys, int n) | Total length of a polyline through n sampled points. |
SLPDE #sleela 2.5 (lib/math/SLPDE.sleela)
SLPDE class
Defines the SLeeLa standard-library type SLPDE used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
heatStep | void heatStep(double[] u, int n, double alpha, double dx, double dt, double[] out) | No description in source. |
stabilityRatio | double stabilityRatio(double alpha, double dx, double dt) | Stability ratio r = alpha dt / dx^2; explicit scheme is stable when r <= 0.5. |
SLPercentile #sleela 2.5 (lib/math/SLPercentile.sleela)
SLPercentile class
Defines the SLeeLa standard-library type SLPercentile used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double[] a, int n, double p) | Linear-interpolation percentile p in [0,100] over sorted data `a`. |
sortInPlace | void sortInPlace(double[] a, int n) | No description in source. |
SLPermutation #sleela 2.5 (lib/math/SLPermutation.sleela)
SLPermutation class
Defines the SLeeLa standard-library type SLPermutation used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
count | long count(int n, int k) | P(n,k), the number of ordered k-arrangements of an n-set. |
total | long total(int n) | n! total permutations. |
SLPermutationGenerator #sleela 2.5 (lib/math/SLPermutationGenerator.sleela)
SLPermutationGenerator class
Defines the SLeeLa standard-library type SLPermutationGenerator used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
count | long count(int n) | Count of distinct permutations of n items = n!. |
next | boolean next(int[] a, int n) | No description in source. |
SLPhysicalConstant #sleela 2.5 (lib/math/SLPhysicalConstant.sleela)
SLPhysicalConstant class
Defines the SLeeLa standard-library type SLPhysicalConstant used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
speedOfLight | double speedOfLight() | No description in source. |
planck | double planck() | No description in source. |
elementaryCharge | double elementaryCharge() | No description in source. |
avogadro | double avogadro() | No description in source. |
boltzmann | double boltzmann() | No description in source. |
gravitation | double gravitation() | No description in source. |
SLPiReference #sleela 2.5 (lib/math/SLPiReference.sleela)
SLPiReference class
SLPiReference is the Modium static reference variable for the mathematical constant pi. It carries pi inline to the irrational-digit-carry norm (SLMathNorms.DEFAULT_IRRATIONAL_CARRY = 2048 fractional digits) as a static final String, reports its own digit count and a digit checksum, and self-verifies its leading digits against a known reference. The value is a Modium catalog static: a single authoritative, hash-checkable reference that the SLeeLa registry seeds as a default start value.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
PI | static final String PI = "3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859502445945534690830264252230825334468503526193118817101000313783875288658753320838142061717766914730359825349042875546873115956286388235378759375195778185778053217122680661300192787661119590921642019893809525720106548586327886593615338182796823030195203530185296899577362259941389124972177528347913151557485724245415069595082953311686172785588907509838175463746493931925506040092770167113900984882401285836160356370766010471018194295559619894676783744944825537977472684710404753464620804668425906949129331367702898915210475216205696602405803815019351125338243003558764024749647326391419927260426992279678235478163600934172164121992458631503028618297455570674983850549458858692699569092721079750930295532116534498720275596023648066549911988183479775356636980742654252786255181841757467289097777279380008164706001614524919217321721477235014144197356854816136115735255213347574184946843852332390739414333454776241686251898356948556209921922218427255025425688767179049460165346680498862723279178608578438382796797668145410095388378636095068006422512520511739298489608412848862694560424196528502221066118630674427862203919494504712371378696095636437191728746776465757396241389086583264599581339047802759009946576407895126946839835259570982582262052248940" | No description in source. |
PI_HEAD | static final String PI_HEAD = "3.141592653589793238462643383279502884197169399375105820974944" | The published head: "3." plus the first 60 fractional digits. |
PI_TAIL | static final String PI_TAIL = "59230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859502445945534690830264252230825334468503526193118817101000313783875288658753320838142061717766914730359825349042875546873115956286388235378759375195778185778053217122680661300192787661119590921642019893809525720106548586327886593615338182796823030195203530185296899577362259941389124972177528347913151557485724245415069595082953311686172785588907509838175463746493931925506040092770167113900984882401285836160356370766010471018194295559619894676783744944825537977472684710404753464620804668425906949129331367702898915210475216205696602405803815019351125338243003558764024749647326391419927260426992279678235478163600934172164121992458631503028618297455570674983850549458858692699569092721079750930295532116534498720275596023648066549911988183479775356636980742654252786255181841757467289097777279380008164706001614524919217321721477235014144197356854816136115735255213347574184946843852332390739414333454776241686251898356948556209921922218427255025425688767179049460165346680498862723279178608578438382796797668145410095388378636095068006422512520511739298489608412848862694560424196528502221066118630674427862203919494504712371378696095636437191728746776465757396241389086583264599581339047802759009946576407895126946839835259570982582262052248940" | The published tail: the remaining fractional digits. PI_HEAD + PI_TAIL == PI. |
PI_HEAD_ECHO | static final String PI_HEAD_ECHO = "3.141592653589793238462643383279502884197169399375105820974944" | An independent echo of the head, for a tamper check against PI_HEAD. |
PI_REF_50 | static final String PI_REF_50 = "14159265358979323846264338327950288419716939937510" | The first 50 fractional digits, a widely published reference for pi. |
PI_HEAD_FRACTION_50 | static final String PI_HEAD_FRACTION_50 = "14159265358979323846264338327950288419716939937510" | The head with the leading "3." stripped: the first 50 then 60 digits. |
PI_DIGITS | static final int PI_DIGITS = 2048 | The number of fractional digits carried inline (the irrational-carry norm). |
PI_DIGIT_CHECKSUM | static final int PI_DIGIT_CHECKSUM = 9338 | The sum of the fractional decimal digits -- a stable integrity checksum. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
value | String value() | No description in source. |
digitCount | int digitCount() | No description in source. |
checksum | int checksum() | No description in source. |
head | String head() | The published head ("3." + first 60 fractional digits), via a method. |
verify | boolean verify() | No description in source. |
firstFiftyTwo | String firstFiftyTwo() | The first 52 characters ("3." + 50 digits), rebuilt from the reference. |
report | String report() | A one-line human report of the verification outcome. |
available | boolean available() | No description in source. |
SLPlane #sleela 2.5 (lib/math/SLPlane.sleela)
SLPlane class
Defines the SLeeLa standard-library type SLPlane used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
a | double a | No description in source. |
b | double b | No description in source. |
c | double c | No description in source. |
d | double d | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
set | void set(double pa, double pb, double pc, double pd) | No description in source. |
signedDistance | double signedDistance(double x, double y, double z) | No description in source. |
SLPoint #sleela 2.5 (lib/math/SLPoint.sleela)
SLPoint class
Defines the SLeeLa standard-library type SLPoint used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
x | double x | No description in source. |
y | double y | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
set | void set(double px, double py) | No description in source. |
distanceTo | double distanceTo(SLPoint o) | No description in source. |
getX | double getX() | No description in source. |
getY | double getY() | No description in source. |
SLPoissonDistribution #sleela 2.5 (lib/math/SLPoissonDistribution.sleela)
SLPoissonDistribution class
Defines the SLeeLa standard-library type SLPoissonDistribution used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
expf | double expf(double x) | No description in source. |
pmf | double pmf(double lambda, int k) | Probability mass lambda^k e^(-lambda) / k!. |
mean | double mean(double lambda) | No description in source. |
variance | double variance(double lambda) | No description in source. |
SLPolarCoordinate #sleela 2.5 (lib/math/SLPolarCoordinate.sleela)
SLPolarCoordinate class
Defines the SLeeLa standard-library type SLPolarCoordinate used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
r | double r | No description in source. |
theta | double theta | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
pi | double pi() | No description in source. |
reduce | double reduce(double x) | No description in source. |
sin | double sin(double x) | No description in source. |
cos | double cos(double x) | No description in source. |
set | void set(double radius, double angle) | No description in source. |
toX | double toX() | No description in source. |
toY | double toY() | No description in source. |
getR | double getR() | No description in source. |
getTheta | double getTheta() | No description in source. |
SLPolynomial #sleela 2.5 (lib/math/SLPolynomial.sleela)
SLPolynomial class
Defines the SLeeLa standard-library type SLPolynomial used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
evaluate | double evaluate(double[] coeffs, int degree, double x) | No description in source. |
derivative | void derivative(double[] coeffs, int degree, double[] out) | Derivative coefficients written into out (length degree). |
add | void add(double[] a, double[] b, double[] out, int n) | No description in source. |
SLPolynomialRegression #sleela 2.5 (lib/math/SLPolynomialRegression.sleela)
SLPolynomialRegression class
Defines the SLeeLa standard-library type SLPolynomialRegression used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
c0 | double c0 | No description in source. |
c1 | double c1 | No description in source. |
c2 | double c2 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
fit | void fit(double[] xs, double[] ys, int n) | No description in source. |
predict | double predict(double x) | No description in source. |
SLPower #sleela 2.5 (lib/math/SLPower.sleela)
SLPower class
Defines the SLeeLa standard-library type SLPower used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
intPow | double intPow(double x, int n) | Integer power x to the n by binary exponentiation (negative n inverts). |
square | double square(double x) | Square and cube helpers. |
cube | double cube(double x) | No description in source. |
SLPrecision #sleela 2.5 (lib/math/SLPrecision.sleela)
SLPrecision class
Defines the SLeeLa standard-library type SLPrecision used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
significantDigits | int significantDigits(double relativeError) | Number of correct significant digits implied by a relative error. |
withinTolerance | boolean withinTolerance(double a, double b, double tol) | No description in source. |
epsilon | double epsilon() | The machine epsilon for IEEE-754 double precision (2^-52). |
maxDigits | int maxDigits() | The largest number of reliable significant decimal digits in a double. |
almostEqual | boolean almostEqual(double a, double b, double relTol) | No description in source. |
agreeingDigits | int agreeingDigits(double a, double b) | No description in source. |
relativeError | double relativeError(double approx, double reference) | No description in source. |
SLPredicate #sleela 2.5 (lib/math/SLPredicate.sleela)
SLPredicate class
Defines the SLeeLa standard-library type SLPredicate used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
kind | int kind | No description in source. |
threshold | double threshold | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(int k, double t) | No description in source. |
test | boolean test(double x) | No description in source. |
SLPrime #sleela 2.5 (lib/math/SLPrime.sleela)
SLPrime class
Defines the SLeeLa standard-library type SLPrime used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
isPrime | boolean isPrime(int n) | Primality test by trial division up to sqrt(n). |
nextPrime | int nextPrime(int n) | The next prime strictly greater than n. |
SLPrimeFactorization #sleela 2.5 (lib/math/SLPrimeFactorization.sleela)
SLPrimeFactorization class
Defines the SLeeLa standard-library type SLPrimeFactorization used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
factorCount | int factorCount(int n) | Count the prime factors of n with multiplicity, for n of at least 1. |
largestFactor | int largestFactor(int n) | The largest prime factor of n. |
SLProbability #sleela 2.5 (lib/math/SLProbability.sleela)
SLProbability class
Defines the SLeeLa standard-library type SLProbability used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
clamp | double clamp(double p) | Clamp a raw value to a valid probability in [0, 1]. |
complement | double complement(double p) | No description in source. |
andIndependent | double andIndependent(double a, double b) | Probability of independent events both occurring. |
orExclusive | double orExclusive(double a, double b) | Probability of either of two mutually-exclusive events. |
orIndependent | double orIndependent(double a, double b) | Inclusive-or for independent events: a + b - a*b. |
SLProbabilityDensity #sleela 2.5 (lib/math/SLProbabilityDensity.sleela)
SLProbabilityDensity class
Defines the SLeeLa standard-library type SLProbabilityDensity used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
normalPdf | double normalPdf(double x, double mean, double stdDev) | Standard-normal probability density function at x. |
expNeg | double expNeg(double t) | e to the minus t for nonnegative t, via a Taylor series on the argument. |
SLProbabilityMass #sleela 2.5 (lib/math/SLProbabilityMass.sleela)
SLProbabilityMass class
Defines the SLeeLa standard-library type SLProbabilityMass used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
valid | boolean valid(double[] probs, int n, double tol) | Validate that a discrete PMF over n outcomes sums to 1 (within tol). |
cumulative | double cumulative(double[] probs, int k) | Cumulative mass through index k inclusive. |
SLProduct #sleela 2.5 (lib/math/SLProduct.sleela)
SLProduct class
Defines the SLeeLa standard-library type SLProduct used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double[] xs, int n) | No description in source. |
times | double times(double a, double b) | No description in source. |
SLProgression #sleela 2.5 (lib/math/SLProgression.sleela)
SLProgression class
Defines the SLeeLa standard-library type SLProgression used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
arithmeticTerm | double arithmeticTerm(double a, double d, int k) | Arithmetic progression: n-th term a + (n-1) d (1-indexed). |
arithmeticSum | double arithmeticSum(double a, double d, int k) | Sum of the first k arithmetic terms. |
geometricTerm | double geometricTerm(double a, double r, int k) | Geometric progression: n-th term a r^(n-1). |
geometricSum | double geometricSum(double a, double r, int k) | Sum of the first k geometric terms. |
SLQuadraticProgram #sleela 2.5 (lib/math/SLQuadraticProgram.sleela)
SLQuadraticProgram class
Defines the SLeeLa standard-library type SLQuadraticProgram used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
objective | double objective(double[] q, double[] c, double[] x, int n) | No description in source. |
gradient | void gradient(double[] q, double[] c, double[] x, int n, double[] out) | No description in source. |
SLQuantity #sleela 2.5 (lib/math/SLQuantity.sleela)
SLQuantity class
Defines the SLeeLa standard-library type SLQuantity used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
magnitude | double magnitude | A physical quantity: a numeric magnitude paired with a unit scale to SI. |
unitScale | double unitScale | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double m, double scaleToSI) | No description in source. |
inSI | double inSI() | No description in source. |
getMagnitude | double getMagnitude() | No description in source. |
add | void add(SLQuantity o) | No description in source. |
SLQuaternion #sleela 2.5 (lib/math/SLQuaternion.sleela)
SLQuaternion class
Defines the SLeeLa standard-library type SLQuaternion used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
w | double w | No description in source. |
x | double x | No description in source. |
y | double y | No description in source. |
z | double z | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
set | void set(double pw, double px, double py, double pz) | No description in source. |
norm | double norm() | No description in source. |
multiply | void multiply(SLQuaternion o, SLQuaternion out) | Hamilton product this * o written into out (w,x,y,z). |
conjugate | void conjugate(SLQuaternion out) | No description in source. |
SLRandomDistribution #sleela 2.5 (lib/math/SLRandomDistribution.sleela)
SLRandomDistribution class
Defines the SLeeLa standard-library type SLRandomDistribution used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sampleIndex | int sampleIndex(double[] cumulative, int n, double u) | No description in source. |
toCumulative | void toCumulative(double[] probs, int n, double[] out) | Build a cumulative array from probabilities. |
SLRandomGenerator #sleela 2.5 (lib/math/SLRandomGenerator.sleela)
SLRandomGenerator class
Defines the SLeeLa standard-library type SLRandomGenerator used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
state | long state | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
seed | void seed(long s) | No description in source. |
nextLong | long nextLong() | No description in source. |
next | double next() | No description in source. |
nextInt | int nextInt(int bound) | No description in source. |
SLRandomVariable #sleela 2.5 (lib/math/SLRandomVariable.sleela)
SLRandomVariable class
Defines the SLeeLa standard-library type SLRandomVariable used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
expectation | double expectation(double[] values, double[] probs, int n) | No description in source. |
variance | double variance(double[] values, double[] probs, int n) | No description in source. |
SLRational #sleela 2.5 (lib/math/SLRational.sleela)
SLRational class
Defines the SLeeLa standard-library type SLRational used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
num | int num | No description in source. |
den | int den | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gcd | int gcd(int a, int b) | No description in source. |
set | void set(int n, int d) | No description in source. |
toDouble | double toDouble() | No description in source. |
getNum | int getNum() | No description in source. |
getDen | int getDen() | No description in source. |
SLRay #sleela 2.5 (lib/math/SLRay.sleela)
SLRay class
Defines the SLeeLa standard-library type SLRay used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
ox | double ox | No description in source. |
oy | double oy | No description in source. |
dx | double dx | No description in source. |
dy | double dy | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double originX, double originY, double dirX, double dirY) | No description in source. |
pointX | double pointX(double t) | No description in source. |
pointY | double pointY(double t) | No description in source. |
SLReciprocal #sleela 2.5 (lib/math/SLReciprocal.sleela)
SLReciprocal class
Defines the SLeeLa standard-library type SLReciprocal used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double x) | The multiplicative inverse 1/x; returns 0.0 for x == 0 (no infinity). |
defined | boolean defined(double x) | No description in source. |
SLRecurrence #sleela 2.5 (lib/math/SLRecurrence.sleela)
SLRecurrence class
Defines the SLeeLa standard-library type SLRecurrence used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
evaluate | double evaluate(double x0, double x1, double p, double q, int k) | No description in source. |
SLRecurrenceSolver #sleela 2.5 (lib/math/SLRecurrenceSolver.sleela)
SLRecurrenceSolver class
Defines the SLeeLa standard-library type SLRecurrenceSolver used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
characteristicRoots | boolean characteristicRoots(double p, double q, double[] out) | No description in source. |
SLRegression #sleela 2.5 (lib/math/SLRegression.sleela)
SLRegression class
Defines the SLeeLa standard-library type SLRegression used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
slope | double slope | No description in source. |
intercept | double intercept | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
fit | void fit(double[] xs, double[] ys, int n) | No description in source. |
predict | double predict(double x) | No description in source. |
SLRegressionModel #sleela 2.5 (lib/math/SLRegressionModel.sleela)
SLRegressionModel class
Defines the SLeeLa standard-library type SLRegressionModel used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
slope | double slope | A fitted linear model plus its coefficient of determination R^2. |
intercept | double intercept | No description in source. |
rSquared | double rSquared | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
fit | void fit(double[] xs, double[] ys, int n) | No description in source. |
getRSquared | double getRSquared() | No description in source. |
predict | double predict(double x) | No description in source. |
SLRegularization #sleela 2.5 (lib/math/SLRegularization.sleela)
SLRegularization class
Defines the SLeeLa standard-library type SLRegularization used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
l2Penalty | double l2Penalty(double[] w, int n, double lambda) | No description in source. |
l1Penalty | double l1Penalty(double[] w, int n, double lambda) | No description in source. |
SLRelation #sleela 2.5 (lib/math/SLRelation.sleela)
SLRelation class
Defines the SLeeLa standard-library type SLRelation used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
n | int n | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int size) | No description in source. |
reflexive | boolean reflexive(int[] r) | No description in source. |
symmetric | boolean symmetric(int[] r) | No description in source. |
transitive | boolean transitive(int[] r) | No description in source. |
SLResidual #sleela 2.5 (lib/math/SLResidual.sleela)
SLResidual class
Defines the SLeeLa standard-library type SLResidual used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
absd | double absd(double x) | No description in source. |
of | double of(double[] row, double[] x, double b, int n) | Residual r = b - A*x for one equation row (dot of row with x). |
normInf | double normInf(double[] r, int n) | No description in source. |
SLRoot #sleela 2.5 (lib/math/SLRoot.sleela)
SLRoot class
Defines the SLeeLa standard-library type SLRoot used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
nthRoot | double nthRoot(double x, int n) | Real n-th root of x for odd n (or nonnegative x) via Newton iteration. |
squareRoot | double squareRoot(double x) | No description in source. |
SLRootFinder #sleela 2.5 (lib/math/SLRootFinder.sleela)
SLRootFinder class
Defines the SLeeLa standard-library type SLRootFinder used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
absd | double absd(double x) | No description in source. |
signChange | boolean signChange(double fa, double fb) | Fixed-point / sign test helpers for a sampled root search. |
bisectStep | double bisectStep(double a, double b) | No description in source. |
within | boolean within(double fx, double tol) | No description in source. |
SLRotation #sleela 2.5 (lib/math/SLRotation.sleela)
SLRotation class
Defines the SLeeLa standard-library type SLRotation used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
pi | double pi() | No description in source. |
reduce | double reduce(double x) | No description in source. |
sin | double sin(double x) | No description in source. |
cos | double cos(double x) | No description in source. |
rotate2D | void rotate2D(double x, double y, double theta, double[] out) | No description in source. |
SLRounding #sleela 2.5 (lib/math/SLRounding.sleela)
SLRounding class
Defines the SLeeLa standard-library type SLRounding used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
nearest | long nearest(double x) | Round half-up to the nearest integer (as a long). |
floorOf | long floorOf(double x) | No description in source. |
ceilOf | long ceilOf(double x) | No description in source. |
truncate | double truncate(double x) | No description in source. |
SLRungeKutta #sleela 2.5 (lib/math/SLRungeKutta.sleela)
SLRungeKutta class
Defines the SLeeLa standard-library type SLRungeKutta used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
step | double step(double y, double k1, double k2, double k3, double k4, double h) | No description in source. |
stageOffset | double stageOffset(int stage, double h) | No description in source. |
SLScalarField #sleela 2.5 (lib/math/SLScalarField.sleela)
SLScalarField class
Defines the SLeeLa standard-library type SLScalarField used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
w | int w | No description in source. |
h | int h | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int width, int height) | No description in source. |
at | double at(double[] grid, int x, int y) | No description in source. |
gradX | double gradX(double[] grid, int x, int y, double spacing) | Gradient component along x at an interior cell by central difference. |
SLScale #sleela 2.5 (lib/math/SLScale.sleela)
SLScale class
Defines the SLeeLa standard-library type SLScale used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
scale2D | void scale2D(double x, double y, double sx, double sy, double[] out) | Scale a point about the origin by (sx, sy), written into out. |
uniform | double uniform(double v, double factor) | No description in source. |
SLSecantMethod #sleela 2.5 (lib/math/SLSecantMethod.sleela)
SLSecantMethod class
Defines the SLeeLa standard-library type SLSecantMethod used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
step | double step(double x0, double x1, double f0, double f1) | One secant update using the two previous iterates and their f-values. |
SLSeededRandom #sleela 2.5 (lib/math/SLSeededRandom.sleela)
SLSeededRandom class
Defines the SLeeLa standard-library type SLSeededRandom used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
state | long state | No description in source. |
initial | long initial | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
seed | void seed(long s) | No description in source. |
reset | void reset() | No description in source. |
next | double next() | No description in source. |
SLSequence #sleela 2.5 (lib/math/SLSequence.sleela)
SLSequence class
Defines the SLeeLa standard-library type SLSequence used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
terms | double[] terms | No description in source. |
n | int n | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int count) | No description in source. |
setTerm | void setTerm(int i, double v) | No description in source. |
getTerm | double getTerm(int i) | No description in source. |
length | int length() | No description in source. |
sum | double sum() | No description in source. |
SLSeries #sleela 2.5 (lib/math/SLSeries.sleela)
SLSeries class
Defines the SLeeLa standard-library type SLSeries used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
partialSum | double partialSum(double[] terms, int k) | Partial sum of a sampled series (first k terms). |
geometricLimit | double geometricLimit(double a, double r) | Geometric series limit a/(1-r) for |r| < 1. |
SLSeriesExpansion #sleela 2.5 (lib/math/SLSeriesExpansion.sleela)
SLSeriesExpansion class
Defines the SLeeLa standard-library type SLSeriesExpansion used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
expSeries | double expSeries(double x, int n) | e^x partial sum through n terms (Maclaurin). |
geometricSeries | double geometricSeries(double x, int n) | Geometric 1/(1-x) partial sum through n terms, |x| < 1. |
SLSetOperations #sleela 2.5 (lib/math/SLSetOperations.sleela)
SLSetOperations class
Defines the SLeeLa standard-library type SLSetOperations used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
contains | boolean contains(int[] a, int na, int v) | No description in source. |
union | int union(int[] a, int na, int[] b, int nb, int[] out) | No description in source. |
intersection | int intersection(int[] a, int na, int[] b, int nb, int[] out) | Intersection of a and b into out; returns its size. |
difference | int difference(int[] a, int na, int[] b, int nb, int[] out) | Difference a minus b into out; returns its size. |
SLSetTheory #sleela 2.5 (lib/math/SLSetTheory.sleela)
SLSetTheory class
Defines the SLeeLa standard-library type SLSetTheory used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
contains | boolean contains(int[] a, int na, int v) | Does the sorted set `a` (length na) contain value v? |
subset | boolean subset(int[] a, int na, int[] b, int nb) | Is `a` a subset of `b`? |
cardinality | int cardinality(int[] a, int na) | No description in source. |
SLSignal #sleela 2.5 (lib/math/SLSignal.sleela)
SLSignal class
Defines the SLeeLa standard-library type SLSignal used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
energy | double energy(double[] x, int n) | A sampled discrete signal with energy, power, and convolution helpers. |
rms | double rms(double[] x, int n) | No description in source. |
convolve | void convolve(double[] x, int n, double[] h, int m, double[] out) | No description in source. |
SLSignum #sleela 2.5 (lib/math/SLSignum.sleela)
SLSignum class
Defines the SLeeLa standard-library type SLSignum used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
ofDouble | int ofDouble(double x) | The sign of x: -1, 0, or +1. |
ofInt | int ofInt(int x) | No description in source. |
SLSimpsonRule #sleela 2.5 (lib/math/SLSimpsonRule.sleela)
SLSimpsonRule class
Defines the SLeeLa standard-library type SLSimpsonRule used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
composite | double composite(double[] ys, double a, double b, int n) | Composite Simpson rule over sampled ys (length n+1), n even, on [a,b]. |
SLSine #sleela 2.5 (lib/math/SLSine.sleela)
SLSine class
Defines the SLeeLa standard-library type SLSine used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
pi | double pi() | No description in source. |
reduce | double reduce(double x) | No description in source. |
sin | double sin(double x) | No description in source. |
cos | double cos(double x) | No description in source. |
of | double of(double x) | No description in source. |
SLSkewness #sleela 2.5 (lib/math/SLSkewness.sleela)
SLSkewness class
Defines the SLeeLa standard-library type SLSkewness used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
mean | double mean(double[] xs, int n) | No description in source. |
of | double of(double[] xs, int n) | Population skewness: m3 / m2^(3/2). |
SLSpline #sleela 2.5 (lib/math/SLSpline.sleela)
SLSpline class
Defines the SLeeLa standard-library type SLSpline used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
linearSegment | double linearSegment(double y0, double y1, double t) | No description in source. |
catmullTangent | double catmullTangent(double[] ys, int i, int n) | Catmull-Rom tangent at point i from its neighbours. |
SLStandardDeviation #sleela 2.5 (lib/math/SLStandardDeviation.sleela)
SLStandardDeviation class
Defines the SLeeLa standard-library type SLStandardDeviation used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
mean | double mean(double[] xs, int n) | No description in source. |
population | double population(double[] xs, int n) | Population standard deviation. |
sample | double sample(double[] xs, int n) | Sample standard deviation (n-1 denominator). |
SLStandardError #sleela 2.5 (lib/math/SLStandardError.sleela)
SLStandardError class
Defines the SLeeLa standard-library type SLStandardError used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
ofMean | double ofMean(double sampleStdDev, int n) | Standard error of the mean: s / sqrt(n). |
SLStatistics #sleela 2.5 (lib/math/SLStatistics.sleela)
SLStatistics class
Defines the SLeeLa standard-library type SLStatistics used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
mean | double mean(double[] xs, int n) | No description in source. |
variancePopulation | double variancePopulation(double[] xs, int n) | No description in source. |
stdDevPopulation | double stdDevPopulation(double[] xs, int n) | No description in source. |
range | double range(double[] xs, int n) | No description in source. |
SLSum #sleela 2.5 (lib/math/SLSum.sleela)
SLSum class
Defines the SLeeLa standard-library type SLSum used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double[] xs, int n) | No description in source. |
kahan | double kahan(double[] xs, int n) | Kahan-compensated summation for improved accuracy. |
plus | double plus(double a, double b) | No description in source. |
SLSymbolicMath #sleela 2.5 (lib/math/SLSymbolicMath.sleela)
SLSymbolicMath class
Defines the SLeeLa standard-library type SLSymbolicMath used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
newExp | int newExp | Symbolic rules over monomials represented as (coefficient, exponent) pairs: differentiation and integration of a single power term. >> d/dx of c x^n is (c n) x^(n-1); returns the new coefficient; newExp via field. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
differentiate | double differentiate(double c, int n) | No description in source. |
integrate | double integrate(double c, int n) | Indefinite integral of c x^n is (c/(n+1)) x^(n+1); newExp holds n+1. |
getNewExp | int getNewExp() | No description in source. |
SLSymmetricDifference #sleela 2.5 (lib/math/SLSymmetricDifference.sleela)
SLSymmetricDifference class
Defines the SLeeLa standard-library type SLSymmetricDifference used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
contains | boolean contains(int[] a, int na, int v) | No description in source. |
of | int of(int[] a, int na, int[] b, int nb, int[] out) | Elements in exactly one of a or b, written into out; returns the size. |
SLTangent #sleela 2.5 (lib/math/SLTangent.sleela)
SLTangent class
Defines the SLeeLa standard-library type SLTangent used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
pi | double pi() | No description in source. |
reduce | double reduce(double x) | No description in source. |
sin | double sin(double x) | No description in source. |
cos | double cos(double x) | No description in source. |
of | double of(double x) | No description in source. |
SLTensor #sleela 2.5 (lib/math/SLTensor.sleela)
SLTensor class
Defines the SLeeLa standard-library type SLTensor used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
shape | int[] shape | No description in source. |
rank | int rank | No description in source. |
total | int total | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int[] dims, int k) | No description in source. |
offset | int offset(int[] coord) | No description in source. |
size | int size() | No description in source. |
getRank | int getRank() | No description in source. |
SLTerm #sleela 2.5 (lib/math/SLTerm.sleela)
SLTerm class
Defines the SLeeLa standard-library type SLTerm used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
coefficient | double coefficient | A monomial term coefficient * x^exponent. |
exponent | int exponent | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
set | void set(double c, int e) | No description in source. |
evaluate | double evaluate(double x) | No description in source. |
derivativeCoefficient | double derivativeCoefficient() | No description in source. |
SLTopology #sleela 2.5 (lib/math/SLTopology.sleela)
SLTopology class
Defines the SLeeLa standard-library type SLTopology used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
lo | double lo | No description in source. |
hi | double hi | No description in source. |
closedLow | boolean closedLow | No description in source. |
closedHigh | boolean closedHigh | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(double a, double b, boolean cl, boolean ch) | No description in source. |
contains | boolean contains(double x) | No description in source. |
isBoundary | boolean isBoundary(double x) | No description in source. |
SLTransform #sleela 2.5 (lib/math/SLTransform.sleela)
SLTransform class
Defines the SLeeLa standard-library type SLTransform used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
pi | double pi() | No description in source. |
reduce | double reduce(double x) | No description in source. |
sin | double sin(double x) | No description in source. |
cos | double cos(double x) | No description in source. |
identity | void identity(double[] m) | No description in source. |
apply | void apply(double[] m, double x, double y, double[] out) | No description in source. |
SLTranslation #sleela 2.5 (lib/math/SLTranslation.sleela)
SLTranslation class
Defines the SLeeLa standard-library type SLTranslation used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
translate2D | void translate2D(double x, double y, double tx, double ty, double[] out) | Translate a point by (tx, ty), written into out. |
SLTranspose #sleela 2.5 (lib/math/SLTranspose.sleela)
SLTranspose class
Defines the SLeeLa standard-library type SLTranspose used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | void of(double[] a, double[] out, int r, int c) | Transpose an r x c row-major matrix into out (c x r). |
SLTrapezoidRule #sleela 2.5 (lib/math/SLTrapezoidRule.sleela)
SLTrapezoidRule class
Defines the SLeeLa standard-library type SLTrapezoidRule used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
panel | double panel(double ya, double yb, double h) | One trapezoid panel area. |
composite | double composite(double[] ys, double a, double b, int n) | Composite rule over sampled ys (length n+1) on [a,b]. |
SLTrigonometry #sleela 2.5 (lib/math/SLTrigonometry.sleela)
SLTrigonometry class
Defines the SLeeLa standard-library type SLTrigonometry used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
pi | double pi() | No description in source. |
reduce | double reduce(double x) | No description in source. |
sin | double sin(double x) | No description in source. |
cos | double cos(double x) | No description in source. |
tan | double tan(double x) | No description in source. |
degToRad | double degToRad(double d) | No description in source. |
radToDeg | double radToDeg(double r) | No description in source. |
SLTTest #sleela 2.5 (lib/math/SLTTest.sleela)
SLTTest class
Defines the SLeeLa standard-library type SLTTest used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
mean | double mean(double[] xs, int n) | No description in source. |
oneSample | double oneSample(double[] xs, int n, double mu0) | No description in source. |
SLUnderflow #sleela 2.5 (lib/math/SLUnderflow.sleela)
SLUnderflow class
Defines the SLeeLa standard-library type SLUnderflow used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
smallestNormal | double smallestNormal() | No description in source. |
underflows | boolean underflows(double x, double threshold) | Has a magnitude underflowed below a working threshold (flushed to zero)? |
flush | double flush(double x, double threshold) | No description in source. |
SLUniformDistribution #sleela 2.5 (lib/math/SLUniformDistribution.sleela)
SLUniformDistribution class
Defines the SLeeLa standard-library type SLUniformDistribution used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
a | double a | No description in source. |
b | double b | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(double lo, double hi) | No description in source. |
pdf | double pdf(double x) | No description in source. |
cdf | double cdf(double x) | No description in source. |
mean | double mean() | No description in source. |
variance | double variance() | No description in source. |
SLUnion #sleela 2.5 (lib/math/SLUnion.sleela)
SLUnion class
Defines the SLeeLa standard-library type SLUnion used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
contains | boolean contains(int[] a, int na, int v) | No description in source. |
of | int of(int[] a, int na, int[] b, int nb, int[] out) | No description in source. |
SLUnit #sleela 2.5 (lib/math/SLUnit.sleela)
SLUnit class
Defines the SLeeLa standard-library type SLUnit used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
scale | double scale | No description in source. |
offset | double offset | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(double s, double o) | No description in source. |
toBase | double toBase(double raw) | No description in source. |
fromBase | double fromBase(double si) | No description in source. |
SLUnitConverter #sleela 2.5 (lib/math/SLUnitConverter.sleela)
SLUnitConverter class
Defines the SLeeLa standard-library type SLUnitConverter used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
convert | double convert(double value, double srcScale, double srcOffset, | No description in source. |
celsiusToFahrenheit | double celsiusToFahrenheit(double c) | Celsius to Fahrenheit convenience. |
SLVariable #sleela 2.5 (lib/math/SLVariable.sleela)
SLVariable class
Defines the SLeeLa standard-library type SLVariable used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
nameValue | String nameValue | No description in source. |
value | double value | No description in source. |
bound | boolean bound | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
bind | void bind(String n, double v) | No description in source. |
unbind | void unbind() | No description in source. |
get | double get() | No description in source. |
isBound | boolean isBound() | No description in source. |
variableName | String variableName() | No description in source. |
SLVariance #sleela 2.5 (lib/math/SLVariance.sleela)
SLVariance class
Defines the SLeeLa standard-library type SLVariance used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
mean | double mean(double[] xs, int n) | No description in source. |
population | double population(double[] xs, int n) | Population variance (divides by n). |
sample | double sample(double[] xs, int n) | Sample variance (divides by n-1, Bessel correction). |
SLVector #sleela 2.5 (lib/math/SLVector.sleela)
SLVector class
Defines the SLeeLa standard-library type SLVector used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
dot | double dot(double[] a, double[] b, int n) | Dense n-vector operations over caller-held double[] arrays. |
norm | double norm(double[] a, int n) | No description in source. |
add | void add(double[] a, double[] b, double[] out, int n) | No description in source. |
scale | void scale(double[] a, double s, double[] out, int n) | No description in source. |
SLVector2 #sleela 2.5 (lib/math/SLVector2.sleela)
SLVector2 class
Defines the SLeeLa standard-library type SLVector2 used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
x | double x | No description in source. |
y | double y | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
set | void set(double px, double py) | No description in source. |
dot | double dot(SLVector2 o) | No description in source. |
length | double length() | No description in source. |
cross | double cross(SLVector2 o) | No description in source. |
add | void add(SLVector2 o) | No description in source. |
scale | void scale(double s) | No description in source. |
getX | double getX() | No description in source. |
getY | double getY() | No description in source. |
SLVector3 #sleela 2.5 (lib/math/SLVector3.sleela)
SLVector3 class
Defines the SLeeLa standard-library type SLVector3 used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
x | double x | No description in source. |
y | double y | No description in source. |
z | double z | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
set | void set(double px, double py, double pz) | No description in source. |
dot | double dot(SLVector3 o) | No description in source. |
length | double length() | No description in source. |
add | void add(SLVector3 o) | No description in source. |
scale | void scale(double s) | No description in source. |
cross | void cross(SLVector3 o, SLVector3 out) | Cross product written into `out`. |
getX | double getX() | No description in source. |
getY | double getY() | No description in source. |
getZ | double getZ() | No description in source. |
SLVector4 #sleela 2.5 (lib/math/SLVector4.sleela)
SLVector4 class
Defines the SLeeLa standard-library type SLVector4 used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
x | double x | No description in source. |
y | double y | No description in source. |
z | double z | No description in source. |
w | double w | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
set | void set(double px, double py, double pz, double pw) | No description in source. |
dot | double dot(SLVector4 o) | No description in source. |
length | double length() | No description in source. |
scale | void scale(double s) | No description in source. |
SLVectorField #sleela 2.5 (lib/math/SLVectorField.sleela)
SLVectorField class
Defines the SLeeLa standard-library type SLVectorField used within the math library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
w | int w | No description in source. |
h | int h | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
configure | void configure(int width, int height) | No description in source. |
divergence | double divergence(double[] u, double[] v, int x, int y, double spacing) | No description in source. |
magnitude | double magnitude(double ux, double vy) | No description in source. |
SLVectorNorm #sleela 2.5 (lib/math/SLVectorNorm.sleela)
SLVectorNorm class
Defines the SLeeLa standard-library type SLVectorNorm used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
sqrt | double sqrt(double x) | No description in source. |
l1 | double l1(double[] a, int n) | L1 (taxicab) norm. |
l2 | double l2(double[] a, int n) | L2 (Euclidean) norm. |
lInf | double lInf(double[] a, int n) | L-infinity (maximum absolute component) norm. |
SLVectorProjection #sleela 2.5 (lib/math/SLVectorProjection.sleela)
SLVectorProjection class
Defines the SLeeLa standard-library type SLVectorProjection used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
coefficient | double coefficient(double[] a, double[] b, int n) | Scalar projection of a onto b: (a.b)/|b|^2 as the coefficient. |
project | void project(double[] a, double[] b, double[] out, int n) | Vector projection of a onto b, written into `out`. |
SLZScore #sleela 2.5 (lib/math/SLZScore.sleela)
SLZScore class
Defines the SLeeLa standard-library type SLZScore used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | double of(double x, double mean, double stdDev) | The standard score (x - mean) / stddev. |
unstandardize | double unstandardize(double z, double mean, double stdDev) | Recover the raw value from a z-score. |
SLZTransform #sleela 2.5 (lib/math/SLZTransform.sleela)
SLZTransform class
Defines the SLeeLa standard-library type SLZTransform used within the math library family.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
evaluateReal | double evaluateReal(double[] x, int n, double z) | No description in source. |