calc library

Mathematical and statistical functions and classes.

Classes

BetaDistribution
Beta distribution.
BinomialDistribution
Binomial distribution.
ContinuousDistribution
Abstract superclass for continuous distributions such as NormalDistribution.
DiscreteDistribution<T>
Abstract superclass for discrete distributions.
Distribution<T>
Abstract superclass for probability distributions.
Float32Matrix
Floating-point matrix that stores elements in Float32List.
Float32Tensor
Float32TensorBuilder
Float32Vector
Float64TensorBuilder
FloatTensorBuilder
Frequencies<T>
Frequencies of discrete items.
LinearTensorModel
Linear regression model for scalar variables.
Matrix<T>
A matrix.
MutableRectangle<T extends num>
A class for representing two-dimensional axis-aligned rectangles with mutable properties.
NormalDistribution
Normal distribution (also known as Gaussian distribution).
Point<T extends num>
A utility class for representing two-dimensional positions.
PoissonDistribution
Poisson distribution.
PredictiveModel<X, Y>
A model that predicts output Y, given input X.
Random
A generator of random bool, int, or double values.
Rectangle<T extends num>
A class for representing two-dimensional rectangles whose properties are immutable.
Tensor<T>
Superclass for tensors where elements may be integers, real numbers, or complex numbers.
TensorBuilder<T>
TensorDistribution<T>
A distribution that samples tensor element values from independent distributions.
TensorPairs<T extends Tensor>
Holds lists x and y for calculating properties such as correlation.
TensorShape
Shape of a tensor. Currently the limit is 4 dimensions.
UniformDistribution
Uniform continuous distribution.
Vector<T>
A vector or scalar.

Extensions

ComparableCalc on Iterable<T>
Mathematical/statistical extension methods for iterables where elements implement Comparable.
DateTimeIterableCalc on Iterable<DateTime>
Mathematical/statistical methods for DateTime iterables.
IterableCalc on Iterable<T>
Mathematical/statistical extension methods for Iterable types.
NumIterableCalc on Iterable<T>
Mathematical/statistical extension methods for num iterables.
TensorIterableCalc on Iterable<T>
Mathematical/statistical methods for Tensor<double> iterables.

Constants

e → const double
Base of the natural logarithms.
ln10 → const double
Natural logarithm of 10.
ln2 → const double
Natural logarithm of 2.
log10e → const double
Base-10 logarithm of e.
log2e → const double
Base-2 logarithm of e.
pi → const double
The PI constant.
sqrt1_2 → const double
Square root of 1/2.
sqrt2 → const double
Square root of 2.

Functions

acos(num x) double
Converts x to a double and returns its arc cosine in radians.
asin(num x) double
Converts x to a double and returns its arc sine in radians.
atan(num x) double
Converts x to a double and returns its arc tangent in radians.
atan2(num a, num b) double
A variant of atan.
binomialCoefficient(int n, int k) int
Binomial coefficient ("given N items, how many combinations have K items?").
cos(num radians) double
Converts radians to a double and returns the cosine of the value.
exp(num x) double
Converts x to a double and returns the natural exponent, e, to the power x.
factorial(int k) int
Factorial function.
log(num x) double
Converts x to a double and returns the natural logarithm of the value.
max<T extends num>(T a, T b) → T
Returns the larger of two numbers.
min<T extends num>(T a, T b) → T
Returns the lesser of two numbers.
pow(num x, num exponent) num
Returns x to the power of exponent.
sin(num radians) double
Converts radians to a double and returns the sine of the value.
sqrt(num x) double
Converts x to a double and returns the positive square root of the value.
tan(num radians) double
Converts radians to a double and returns the tangent of the value.