public class Maths extends org.eclipse.january.dataset.internal.GeneratedMaths
Constructor and Description |
---|
Maths() |
Modifier and Type | Method and Description |
---|---|
static Dataset |
abs(Object a)
abs - absolute value of each element
|
static Dataset |
abs(Object a,
Dataset o)
abs - absolute value of each element
|
static Dataset |
add(Collection<IDataset> sets,
boolean requireClone)
Adds all sets passed in together
The first IDataset must cast to Dataset
For memory efficiency sake if add(...) is called with a set of size one,
no clone is done, the original object is returned directly.
|
static Dataset |
angle(Object a)
Create a dataset of the arguments from a complex dataset
|
static Dataset |
angle(Object a,
boolean inDegrees)
Create a dataset of the arguments from a complex dataset
|
static Dataset |
angle(Object a,
boolean inDegrees,
Dataset o)
Create a dataset of the arguments from a complex dataset
|
static Dataset |
angle(Object a,
Dataset o)
Create a dataset of the arguments from a complex dataset
|
static Dataset |
arctan2(Object a,
Object b) |
static Dataset |
arctan2(Object a,
Object b,
Dataset o) |
static Dataset |
centralDifference(Dataset a,
int axis)
Discrete difference of dataset along axis using finite central difference
|
static Dataset |
conjugate(Object a) |
static Dataset |
conjugate(Object a,
Dataset o) |
static Dataset |
derivative(Dataset x,
Dataset y,
int n)
Calculates the derivative of a line described by two datasets (x,y) given
a spread of n either side of the point
|
static Dataset |
difference(Dataset a,
int n,
int axis)
Discrete difference of dataset along axis using finite difference
|
static Dataset |
floorDivide(Object a,
Object b) |
static Dataset |
floorDivide(Object a,
Object b,
Dataset o) |
static Dataset |
floorRemainder(Object a,
Object b) |
static Dataset |
floorRemainder(Object a,
Object b,
Dataset o) |
static void |
getBilinear(double[] values,
CompoundDataset d,
double x0,
double x1)
Deprecated.
|
static double |
getBilinear(IDataset d,
double x0,
double x1)
Deprecated.
|
static double |
getBilinear(IDataset d,
IDataset m,
double x0,
double x1)
Deprecated.
|
static void |
getLinear(double[] values,
CompoundDataset d,
double x0)
Deprecated.
|
static double |
getLinear(IDataset d,
double x0)
Deprecated.
|
static List<Dataset> |
gradient(Dataset y,
Dataset... x)
Calculate gradient (or partial derivatives) by central difference
|
static Dataset |
hypot(Object a,
Object b) |
static Dataset |
hypot(Object a,
Object b,
Dataset o) |
static double |
interpolate(Dataset d,
Dataset m,
double... x)
Linearly interpolate a value at a point in a n-D dataset with a mask.
|
static double |
interpolate(Dataset d,
Dataset m,
double x0)
Linearly interpolate a value at a point in a 1D dataset with a mask.
|
static double |
interpolate(Dataset d,
Dataset m,
double x0,
double x1)
Linearly interpolate a value at a point in a 2D dataset with a mask.
|
static Dataset |
interpolate(Dataset x,
Dataset d,
IDataset x0,
Number left,
Number right)
Linearly interpolate values at points in a 1D dataset corresponding to
given coordinates.
|
static double |
interpolate(Dataset d,
double... x)
Linearly interpolate a value at a point in a n-D dataset.
|
static double |
interpolate(Dataset d,
double x0)
Linearly interpolate a value at a point in a 1D dataset.
|
static double |
interpolate(Dataset d,
double x0,
double x1)
Linearly interpolate a value at a point in a 2D dataset.
|
static void |
interpolate(double[] values,
CompoundDataset d,
double... x)
Linearly interpolate an array of values at a point in a compound n-D
dataset.
|
static void |
interpolate(double[] values,
CompoundDataset d,
double x0)
Linearly interpolate an array of values at a point in a compound 1D
dataset.
|
static void |
interpolate(double[] values,
CompoundDataset d,
double x0,
double x1)
Linearly interpolate an array of values at a point in a compound 2D
dataset.
|
static Dataset |
multiply(Collection<IDataset> sets,
boolean requireClone)
Multiplies all sets passed in together
The first IDataset must cast to Dataset
|
static Dataset |
phaseAsComplexNumber(Object a,
boolean keepZeros)
Create a phase only dataset.
|
static Dataset |
phaseAsComplexNumber(Object a,
Dataset o,
boolean keepZeros)
Create a phase only dataset.
|
static Dataset |
reciprocal(Object a)
Find reciprocal from dataset
|
static Dataset |
reciprocal(Object a,
Dataset o)
Find reciprocal from dataset
|
static Object |
unwrap(Dataset o,
Object... a)
Unwrap result from mathematical methods if necessary
|
static Object |
unwrap(Dataset o,
Object a)
Unwrap result from mathematical methods if necessary
|
static Object |
unwrap(Dataset o,
Object a,
Object b)
Unwrap result from mathematical methods if necessary
|
add, add, addBinaryOperatorName, addFunctionName, addFunctionName, arccos, arccos, arccosh, arccosh, arcsin, arcsin, arcsinh, arcsinh, arctan, arctan, arctanh, arctanh, bitwiseAnd, bitwiseAnd, bitwiseInvert, bitwiseInvert, bitwiseOr, bitwiseOr, bitwiseXor, bitwiseXor, cbrt, cbrt, ceil, ceil, clip, clip, cos, cos, cosh, cosh, divide, divide, divideTowardsFloor, divideTowardsFloor, dividez, dividez, exp, exp, expm1, expm1, floor, floor, leftShift, leftShift, log, log, log10, log10, log1p, log1p, log2, log2, maximum, maximum, minimum, minimum, multiply, multiply, negative, negative, power, power, remainder, remainder, rightShift, rightShift, rint, rint, signum, signum, sin, sin, sinh, sinh, sqrt, sqrt, square, square, subtract, subtract, tan, tan, tanh, tanh, toDegrees, toDegrees, toLong, toRadians, toRadians, truncate, truncate, unsignedRightShift, unsignedRightShift
public Maths()
public static Object unwrap(Dataset o, Object a)
o
- a
- public static Object unwrap(Dataset o, Object a, Object b)
o
- a
- public static Object unwrap(Dataset o, Object... a)
o
- a
- public static Dataset floorDivide(Object a, Object b)
a
- b
- public static Dataset floorDivide(Object a, Object b, Dataset o)
a
- b
- o
- output can be null - in which case, a new dataset is createdpublic static Dataset floorRemainder(Object a, Object b)
a
- b
- public static Dataset floorRemainder(Object a, Object b, Dataset o)
a
- b
- o
- output can be null - in which case, a new dataset is createdpublic static Dataset reciprocal(Object a)
a
- public static Dataset reciprocal(Object a, Dataset o)
a
- o
- output can be null - in which case, a new dataset is createdpublic static Dataset abs(Object a)
a
- public static Dataset abs(Object a, Dataset o)
a
- o
- output can be null - in which case, a new dataset is createdpublic static Dataset conjugate(Object a)
a
- public static Dataset conjugate(Object a, Dataset o)
a
- o
- output can be null - in which case, a new dataset is createdpublic static Dataset hypot(Object a, Object b)
a
- side of right-angled triangleb
- side of right-angled trianglepublic static Dataset hypot(Object a, Object b, Dataset o)
a
- side of right-angled triangleb
- side of right-angled triangleo
- output can be null - in which case, a new dataset is createdpublic static Dataset arctan2(Object a, Object b)
a
- opposite side of right-angled triangleb
- adjacent side of right-angled trianglepublic static Dataset arctan2(Object a, Object b, Dataset o)
a
- opposite side of right-angled triangleb
- adjacent side of right-angled triangleo
- output can be null - in which case, a new dataset is createdpublic static Dataset angle(Object a)
a
- public static Dataset angle(Object a, boolean inDegrees)
a
- inDegrees
- if true then return angles in degrees else in radianspublic static Dataset angle(Object a, Dataset o)
a
- o
- output can be null - in which case, a new dataset is createdpublic static Dataset angle(Object a, boolean inDegrees, Dataset o)
a
- inDegrees
- if true then return angles in degrees else in radianso
- output can be null - in which case, a new dataset is createdpublic static Dataset phaseAsComplexNumber(Object a, boolean keepZeros)
a
- datasetkeepZeros
- if true then zero items are returned as zero rather than NaNspublic static Dataset phaseAsComplexNumber(Object a, Dataset o, boolean keepZeros)
a
- dataseto
- output can be null - in which case, a new dataset is createdkeepZeros
- if true then zero items are returned as zero rather than NaNspublic static Dataset add(Collection<IDataset> sets, boolean requireClone)
sets
- requireClone
- public static Dataset multiply(Collection<IDataset> sets, boolean requireClone)
sets
- requireClone
- public static Dataset interpolate(Dataset x, Dataset d, IDataset x0, Number left, Number right)
x
- input 1-D coordinate dataset (must be ordered)d
- input 1-D datasetx0
- coordinate valuesleft
- value to use when x0 lies left of domain. If null, then
interpolate to zero by using leftmost intervalright
- value to use when x0 lies right of domain. If null, then
interpolate to zero by using rightmost intervalpublic static double interpolate(Dataset d, double x0)
d
- input datasetx0
- coordinatepublic static double interpolate(Dataset d, Dataset m, double x0)
d
- input datasetm
- mask datasetx0
- coordinatepublic static void interpolate(double[] values, CompoundDataset d, double x0)
values
- interpolated arrayd
- input datasetx0
- coordinatepublic static double interpolate(Dataset d, double x0, double x1)
d
- input datasetx0
- coordinatex1
- coordinatepublic static double interpolate(Dataset d, Dataset m, double x0, double x1)
d
- input datasetm
- mask datasetx0
- coordinatex1
- coordinatepublic static void interpolate(double[] values, CompoundDataset d, double x0, double x1)
values
- bilinear interpolated arrayd
- x0
- x1
- public static double interpolate(Dataset d, double... x)
d
- input datasetx
- coordinatespublic static double interpolate(Dataset d, Dataset m, double... x)
d
- input datasetm
- mask dataset (can be null)x
- coordinatespublic static void interpolate(double[] values, CompoundDataset d, double... x)
values
- linearly interpolated arrayd
- x
- @Deprecated public static double getLinear(IDataset d, double x0)
interpolate(Dataset, double)
d
- input datasetx0
- coordinate@Deprecated public static void getLinear(double[] values, CompoundDataset d, double x0)
interpolate(double[], CompoundDataset, double)
values
- interpolated arrayd
- input datasetx0
- coordinate@Deprecated public static double getBilinear(IDataset d, double x0, double x1)
interpolate(Dataset, double, double)
d
- input datasetx0
- coordinatex1
- coordinate@Deprecated public static double getBilinear(IDataset d, IDataset m, double x0, double x1)
interpolate(Dataset, Dataset, double, double)
d
- input datasetm
- mask datasetx0
- coordinatex1
- coordinate@Deprecated public static void getBilinear(double[] values, CompoundDataset d, double x0, double x1)
interpolate(double[], CompoundDataset, double, double)
values
- bilinear interpolated arrayd
- x0
- x1
- public static Dataset difference(Dataset a, int n, int axis)
a
- n
- order of differenceaxis
- public static Dataset derivative(Dataset x, Dataset y, int n)
x
- The x values of the function to take the derivative of.y
- The y values of the function to take the derivative of.n
- The spread the derivative is calculated from, i.e. the
smoothing, the higher the value, the more smoothing occurs.public static Dataset centralDifference(Dataset a, int axis)
a
- axis
- Copyright © 2014–2018 Eclipse Foundation. All rights reserved.