| Package | Description |
|---|---|
| de.javagl.nd.tuples.d |
Multidimensional tuples of
double values |
| Modifier and Type | Interface and Description |
|---|---|
interface |
MutableDoubleTuple
Interface describing an N-dimensional mutable tuple of
double values. |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractDoubleTuple
Abstract base implementation of a
DoubleTuple. |
class |
AbstractMutableDoubleTuple
Abstract base implementation of a
MutableDoubleTuple. |
| Modifier and Type | Method and Description |
|---|---|
static DoubleTuple |
DoubleTuples.constant(int size,
double value)
Returns a tuple with the specified size, where each
element is the given value.
|
static DoubleTuple |
DoubleTuples.reversed(DoubleTuple t)
Creates a new tuple that is a reversed view on the given
tuple.
|
default DoubleTuple |
DoubleTuple.subTuple(int fromIndex,
int toIndex) |
static DoubleTuple |
DoubleTuples.zero(int size)
Returns a tuple with the specified size, containing
all zeros.
|
| Modifier and Type | Method and Description |
|---|---|
static Comparator<DoubleTuple> |
DoubleTuples.comparator(Order order)
Returns a comparator that compares tuples based on the specified
Order. |
| Modifier and Type | Method and Description |
|---|---|
static MutableDoubleTuple |
DoubleTuples.add(DoubleTuple t0,
double value,
MutableDoubleTuple result)
Add the given value to all elements of the given input
tuples, and store the result in the given result tuple.
|
static MutableDoubleTuple |
DoubleTuples.add(DoubleTuple t0,
DoubleTuple t1,
MutableDoubleTuple result)
Add the given input tuples, and store the result in
the given result tuple.
|
static MutableDoubleTuple |
DoubleTuples.addScaled(DoubleTuple t0,
double factor,
DoubleTuple t1,
MutableDoubleTuple result)
Computes
t0+factor*t1, and stores the result in the given
result tuple. |
static MutableDoubleTuple |
DoubleTupleFunctions.apply(DoubleTuple t0,
DoubleTuple t1,
java.util.function.DoubleBinaryOperator op,
MutableDoubleTuple result)
Applies the given binary operator to each pair of elements from the
given tuples, and stores the result in the given result tuple.
|
static MutableDoubleTuple |
DoubleTupleFunctions.apply(DoubleTuple t0,
java.util.function.DoubleUnaryOperator op,
MutableDoubleTuple result)
Applies the given unary operator to element from the given tuple,
and stores the result in the given result tuple.
|
static boolean |
DoubleTuples.areElementsGreaterThan(DoubleTuple t,
double value)
Returns whether all elements of the given tuple
are greater than the given value.
|
static boolean |
DoubleTuples.areElementsGreaterThan(DoubleTuple t0,
DoubleTuple t1)
Returns whether one tuple is element-wise
greater than the other.
|
static boolean |
DoubleTuples.areElementsGreaterThanOrEqual(DoubleTuple t,
double value)
Returns whether all elements of the given tuple
are greater than or equal to the given value.
|
static boolean |
DoubleTuples.areElementsGreaterThanOrEqual(DoubleTuple t0,
DoubleTuple t1)
Returns whether one tuple is element-wise
greater than or equal to the other.
|
static boolean |
DoubleTuples.areElementsLessThan(DoubleTuple t,
double value)
Returns whether all elements of the given tuple
are less than the given value.
|
static boolean |
DoubleTuples.areElementsLessThan(DoubleTuple t0,
DoubleTuple t1)
Returns whether one tuple is element-wise
less than the other
|
static boolean |
DoubleTuples.areElementsLessThanOrEqual(DoubleTuple t,
double value)
Returns whether all elements of the given tuple
are less than or equal to the given value.
|
static boolean |
DoubleTuples.areElementsLessThanOrEqual(DoubleTuple t0,
DoubleTuple t1)
Returns whether one tuple is element-wise
less than or equal to the other
|
static double |
DoubleTuples.arithmeticMean(DoubleTuple t)
Returns the arithmetic mean of the given tuple
|
static List<Double> |
DoubleTuples.asList(DoubleTuple t)
Returns a view on the given tuple as an unmodifiable list.
|
static MutableDoubleTuple |
DoubleTuples.clamp(DoubleTuple t,
double min,
double max,
MutableDoubleTuple result)
Clamp the components of the given tuple to be in the specified range,
and write the result into the given result tuple.
|
static MutableDoubleTuple |
DoubleTuples.clamp(DoubleTuple t,
DoubleTuple min,
DoubleTuple max,
MutableDoubleTuple result)
Clamp the components of the given tuple to be in the specified range,
and write the result into the given result tuple.
|
static int |
DoubleTuples.compareColexicographically(DoubleTuple t0,
DoubleTuple t1)
Compares two tuples colexicographically, starting with
the elements of the highest index.
|
static int |
DoubleTuples.compareLexicographically(DoubleTuple t0,
DoubleTuple t1)
Compares two tuples lexicographically, starting with
the elements of the lowest index.
|
static double |
DoubleTuples.computeL2(DoubleTuple t)
Computes the L2 norm (euclidean length) of the given tuple
|
static boolean |
DoubleTuples.containsNaN(DoubleTuple tuple)
Returns whether the given tuple contains an element that
is Not A Number
|
static MutableDoubleTuple |
DoubleTuples.copy(DoubleTuple other)
Creates a new tuple which is a copy of
the given one.
|
static MutableDoubleTuple |
DoubleTuples.divide(DoubleTuple t0,
DoubleTuple t1,
MutableDoubleTuple result)
Divide the elements of the given input tuples, and store
the results in the given result tuple.
|
static double |
DoubleTuples.dot(DoubleTuple t0,
DoubleTuple t1)
Computes the dot product of the given tuples
|
static MutableDoubleTuple |
DoubleTupleFunctions.exclusiveScan(DoubleTuple t0,
double identity,
java.util.function.DoubleBinaryOperator op,
MutableDoubleTuple result)
Performs an exclusive scan on the elements of the given tuple, using
the provided identity value and associative accumulation function,
and returns the result.
|
static MutableDoubleTuple |
DoubleTupleFunctions.inclusiveScan(DoubleTuple t0,
java.util.function.DoubleBinaryOperator op,
MutableDoubleTuple result)
Performs an inclusive scan on the elements of the given tuple, using
the provided associative accumulation function, and returns the
result.
|
static MutableDoubleTuple |
DoubleTuples.interpolate(DoubleTuple t0,
DoubleTuple t1,
double alpha,
MutableDoubleTuple result)
Computes
t0+alpha*(t1-t0), and stores the result in
the given result tuple. |
static double |
DoubleTuples.max(DoubleTuple t)
Computes the maximum value that occurs in the given tuple,
or
Double.NEGATIVE_INFINITY if the given tuple has a
size of 0. |
static MutableDoubleTuple |
DoubleTuples.max(DoubleTuple t0,
DoubleTuple t1,
MutableDoubleTuple result)
Compute the element-wise maximum of the the given input
tuples, and store the result in the given
result tuple.
|
static double |
DoubleTuples.min(DoubleTuple t)
Computes the minimum value that occurs in the given tuple,
or
Double.POSITIVE_INFINITY if the given tuple has a
size of 0. |
static MutableDoubleTuple |
DoubleTuples.min(DoubleTuple t0,
DoubleTuple t1,
MutableDoubleTuple result)
Compute the element-wise minimum of the the given input
tuples, and store the result in the given
result tuple.
|
static MutableDoubleTuple |
DoubleTuples.multiply(DoubleTuple t0,
double factor,
MutableDoubleTuple result)
Multiply the given input tuple with the given factor, and
store the result in the given result tuple.
|
static MutableDoubleTuple |
DoubleTuples.multiply(DoubleTuple t0,
DoubleTuple t1,
MutableDoubleTuple result)
Multiply the elements of the given input tuples, and store
the results in the given result tuple.
|
static MutableDoubleTuple |
DoubleTuples.negate(DoubleTuple t0,
MutableDoubleTuple result)
Negates the given tuple, and store the result in the given result tuple.
|
static MutableDoubleTuple |
DoubleTuples.normalize(DoubleTuple t,
MutableDoubleTuple result)
Normalize the given tuple and write the result into
the given result tuple.
|
static MutableDoubleTuple |
DoubleTuples.normalizeElements(DoubleTuple t,
double min,
double max,
MutableDoubleTuple result)
Normalize the elements of the given tuple, so that its minimum and
maximum elements match the given minimum and maximum values.
|
static MutableDoubleTuple |
DoubleTuples.normalizeElements(DoubleTuple t,
DoubleTuple min,
DoubleTuple max,
MutableDoubleTuple result)
Normalize the elements of the given tuple, so that each element
will be linearly rescaled to the interval defined by the corresponding
elements of the given minimum and maximum tuple.
|
static double |
DoubleTupleFunctions.reduce(DoubleTuple t0,
double identity,
java.util.function.DoubleBinaryOperator op)
Performs a reduction on the elements of the given tuple, using the
provided identity value and an associative accumulation function,
and returns the reduced value.
|
static MutableDoubleTuple |
DoubleTuples.rescaleElements(DoubleTuple t,
double oldMin,
double oldMax,
double newMin,
double newMax,
MutableDoubleTuple result)
Rescale the elements of the given tuple, so that the specified
old range is mapped to the specified new range.
|
static MutableDoubleTuple |
DoubleTuples.reverse(DoubleTuple t,
MutableDoubleTuple result)
Reverse the given tuple.
|
static DoubleTuple |
DoubleTuples.reversed(DoubleTuple t)
Creates a new tuple that is a reversed view on the given
tuple.
|
default void |
MutableDoubleTuple.set(DoubleTuple other)
Set this tuple to be equal to the given one.
|
static double |
DoubleTuples.standardDeviation(DoubleTuple t)
Returns the standard deviation of the given tuple.
|
static MutableDoubleTuple |
DoubleTupleCollections.standardDeviationFromMean(Collection<? extends DoubleTuple> tuples,
DoubleTuple mean,
MutableDoubleTuple result)
Returns the component-wise standard deviation of the given collection
of
DoubleTuple objects. |
static double |
DoubleTuples.standardDeviationFromMean(DoubleTuple t,
double mean)
Returns the standard deviation of the given tuple.
|
static MutableDoubleTuple |
DoubleTuples.standardDeviationFromVariance(DoubleTuple variance,
MutableDoubleTuple result)
Returns the standard deviation of the given variances (that is,
a tuple containing the square roots of the values in the given
tuple).
|
static MutableDoubleTuple |
DoubleTuples.standardize(DoubleTuple t,
MutableDoubleTuple result)
Standardize the given tuple.
|
static MutableDoubleTuple |
DoubleTuples.subtract(DoubleTuple t0,
double value,
MutableDoubleTuple result)
Subtract the given value from all elements of the given input
tuple, and store the result in the given result tuple.
|
static MutableDoubleTuple |
DoubleTuples.subtract(DoubleTuple t0,
DoubleTuple t1,
MutableDoubleTuple result)
Subtract the given input tuples, and store the result in
the given result tuple.
|
static double[] |
DoubleTuples.toArray(DoubleTuple t)
Creates a new array from the contents of the given tuple
|
static String |
DoubleTuples.toString(DoubleTuple tuple,
int maxNumLeadingElements,
int maxNumTrailingElements)
Returns a string representation of the given tuple using
DoubleTuples.toString(DoubleTuple, Locale, String, int, int) with
the default locale and format. |
static String |
DoubleTuples.toString(DoubleTuple tuple,
Locale locale,
String format,
int maxNumLeadingElements,
int maxNumTrailingElements)
Returns a string representation of the given tuple.
|
static MutableDoubleTuple |
DoubleTupleCollections.variance(Collection<? extends DoubleTuple> tuples,
DoubleTuple mean,
MutableDoubleTuple result)
Computes the component-wise variance of the given collection
of
DoubleTuple objects. |
static double |
DoubleTuples.variance(DoubleTuple t)
Returns the variance of the given tuple.
|
static double |
DoubleTuples.variance(DoubleTuple t,
double mean)
Returns the variance of the given tuple.
|
| Modifier and Type | Method and Description |
|---|---|
static MutableDoubleTuple |
DoubleTupleCollections.add(Collection<? extends DoubleTuple> tuples,
MutableDoubleTuple result)
Computes the component-wise sum of the given collection
of tuples.
|
static MutableDoubleTuple |
DoubleTupleCollections.arithmeticMean(Collection<? extends DoubleTuple> tuples,
MutableDoubleTuple result)
Computes the component-wise arithmetic mean of the given collection
of
DoubleTuple objects. |
static List<MutableDoubleTuple> |
DoubleTupleCollections.deepCopy(Collection<? extends DoubleTuple> tuples)
Returns a deep copy of the given collection of tuples.
|
static MutableDoubleTuple |
DoubleTupleCollections.max(Collection<? extends DoubleTuple> tuples,
MutableDoubleTuple result)
Computes the component-wise maximum of the given collection
of tuples.
|
static MutableDoubleTuple |
DoubleTupleCollections.min(Collection<? extends DoubleTuple> tuples,
MutableDoubleTuple result)
Computes the component-wise minimum of the given collection
of tuples.
|
static List<MutableDoubleTuple> |
DoubleTupleCollections.normalize(Collection<? extends DoubleTuple> inputs,
List<MutableDoubleTuple> results)
Normalize the given collection of
MutableDoubleTuples. |
static MutableDoubleTuple |
DoubleTupleCollections.standardDeviation(Collection<? extends DoubleTuple> tuples,
MutableDoubleTuple result)
Returns the component-wise standard deviation of the given collection
of
DoubleTuple objects. |
static MutableDoubleTuple |
DoubleTupleCollections.standardDeviationFromMean(Collection<? extends DoubleTuple> tuples,
DoubleTuple mean,
MutableDoubleTuple result)
Returns the component-wise standard deviation of the given collection
of
DoubleTuple objects. |
static List<MutableDoubleTuple> |
DoubleTupleCollections.standardize(Collection<? extends DoubleTuple> inputs,
List<MutableDoubleTuple> results)
Standardize the given input tuples.
|
static MutableDoubleTuple |
DoubleTupleCollections.variance(Collection<? extends DoubleTuple> tuples,
DoubleTuple mean,
MutableDoubleTuple result)
Computes the component-wise variance of the given collection
of
DoubleTuple objects. |
static MutableDoubleTuple |
DoubleTupleCollections.variance(Collection<? extends DoubleTuple> tuples,
MutableDoubleTuple result)
Computes the component-wise variance of the given collection
of
DoubleTuple objects. |
Copyright © 2015. All Rights Reserved.