| Package | Description |
|---|---|
| de.javagl.nd.tuples.j |
Multidimensional tuples of
long values |
| Modifier and Type | Interface and Description |
|---|---|
interface |
MutableLongTuple
Interface describing an N-dimensional mutable tuple of
long values. |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractLongTuple
Abstract base implementation of a
LongTuple. |
class |
AbstractMutableLongTuple
Abstract base implementation of a
MutableLongTuple. |
| Modifier and Type | Method and Description |
|---|---|
static LongTuple |
LongTuples.constant(int size,
long value)
Returns a tuple with the specified size, where each
element is the given value.
|
static LongTuple |
LongTuples.reversed(LongTuple t)
Creates a new tuple that is a reversed view on the given
tuple.
|
default LongTuple |
LongTuple.subTuple(int fromIndex,
int toIndex) |
static LongTuple |
LongTuples.zero(int size)
Returns a tuple with the specified size, containing
all zeros.
|
| Modifier and Type | Method and Description |
|---|---|
static Comparator<LongTuple> |
LongTuples.comparator(Order order)
Returns a comparator that compares tuples based on the specified
Order. |
| Modifier and Type | Method and Description |
|---|---|
static MutableLongTuple |
LongTuples.add(LongTuple t0,
long value,
MutableLongTuple result)
Add the given value to all elements of the given input
tuples, and store the result in the given result tuple.
|
static MutableLongTuple |
LongTuples.add(LongTuple t0,
LongTuple t1,
MutableLongTuple result)
Add the given input tuples, and store the result in
the given result tuple.
|
static MutableLongTuple |
LongTuples.addScaled(LongTuple t0,
long factor,
LongTuple t1,
MutableLongTuple result)
Computes
t0+factor*t1, and stores the result in the given
result tuple. |
static MutableLongTuple |
LongTupleFunctions.apply(LongTuple t0,
LongTuple t1,
java.util.function.LongBinaryOperator op,
MutableLongTuple 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 MutableLongTuple |
LongTupleFunctions.apply(LongTuple t0,
java.util.function.LongUnaryOperator op,
MutableLongTuple result)
Applies the given unary operator to element from the given tuple,
and stores the result in the given result tuple.
|
static boolean |
LongTuples.areElementsGreaterThan(LongTuple t,
long value)
Returns whether all elements of the given tuple
are greater than the given value.
|
static boolean |
LongTuples.areElementsGreaterThan(LongTuple t0,
LongTuple t1)
Returns whether one tuple is element-wise
greater than the other.
|
static boolean |
LongTuples.areElementsGreaterThanOrEqual(LongTuple t,
long value)
Returns whether all elements of the given tuple
are greater than or equal to the given value.
|
static boolean |
LongTuples.areElementsGreaterThanOrEqual(LongTuple t0,
LongTuple t1)
Returns whether one tuple is element-wise
greater than or equal to the other.
|
static boolean |
LongTuples.areElementsLessThan(LongTuple t,
long value)
Returns whether all elements of the given tuple
are less than the given value.
|
static boolean |
LongTuples.areElementsLessThan(LongTuple t0,
LongTuple t1)
Returns whether one tuple is element-wise
less than the other
|
static boolean |
LongTuples.areElementsLessThanOrEqual(LongTuple t,
long value)
Returns whether all elements of the given tuple
are less than or equal to the given value.
|
static boolean |
LongTuples.areElementsLessThanOrEqual(LongTuple t0,
LongTuple t1)
Returns whether one tuple is element-wise
less than or equal to the other
|
static List<Long> |
LongTuples.asList(LongTuple t)
Returns a view on the given tuple as an unmodifiable list.
|
static MutableLongTuple |
LongTuples.clamp(LongTuple t,
long min,
long max,
MutableLongTuple result)
Clamp the components of the given tuple to be in the specified range,
and write the result into the given result tuple.
|
static MutableLongTuple |
LongTuples.clamp(LongTuple t,
LongTuple min,
LongTuple max,
MutableLongTuple 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 |
LongTuples.compareColexicographically(LongTuple t0,
LongTuple t1)
Compares two tuples colexicographically, starting with
the elements of the highest index.
|
static int |
LongTuples.compareLexicographically(LongTuple t0,
LongTuple t1)
Compares two tuples lexicographically, starting with
the elements of the lowest index.
|
static MutableLongTuple |
LongTuples.copy(LongTuple other)
Creates a new tuple which is a copy of
the given one.
|
static MutableLongTuple |
LongTuples.divide(LongTuple t0,
LongTuple t1,
MutableLongTuple result)
Divide the elements of the given input tuples, and store
the results in the given result tuple.
|
static long |
LongTuples.dot(LongTuple t0,
LongTuple t1)
Computes the dot product of the given tuples
|
static MutableLongTuple |
LongTupleFunctions.exclusiveScan(LongTuple t0,
long identity,
java.util.function.LongBinaryOperator op,
MutableLongTuple 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 MutableLongTuple |
LongTupleFunctions.inclusiveScan(LongTuple t0,
java.util.function.LongBinaryOperator op,
MutableLongTuple result)
Performs an inclusive scan on the elements of the given tuple, using
the provided associative accumulation function, and returns the
result.
|
static boolean |
LongTuples.incrementColexicographically(LongTuple t,
LongTuple min,
LongTuple max,
MutableLongTuple result)
Colexicographically increment the given tuple in the given range, and
store the result in the given result tuple.
|
static boolean |
LongTuples.incrementLexicographically(LongTuple t,
LongTuple min,
LongTuple max,
MutableLongTuple result)
Lexicographically increment the given tuple in the given range, and
store the result in the given result tuple.
|
static long |
LongTuples.max(LongTuple t)
Computes the maximum value that occurs in the given tuple,
or
Long.MIN_VALUE if the given tuple has a
size of 0. |
static MutableLongTuple |
LongTuples.max(LongTuple t0,
LongTuple t1,
MutableLongTuple result)
Compute the element-wise maximum of the the given input
tuples, and store the result in the given
result tuple.
|
static long |
LongTuples.min(LongTuple t)
Computes the minimum value that occurs in the given tuple,
or
Long.MAX_VALUE if the given tuple has a
size of 0. |
static MutableLongTuple |
LongTuples.min(LongTuple t0,
LongTuple t1,
MutableLongTuple result)
Compute the element-wise minimum of the the given input
tuples, and store the result in the given
result tuple.
|
static MutableLongTuple |
LongTuples.multiply(LongTuple t0,
long factor,
MutableLongTuple result)
Multiply the given input tuple with the given factor, and
store the result in the given result tuple.
|
static MutableLongTuple |
LongTuples.multiply(LongTuple t0,
LongTuple t1,
MutableLongTuple result)
Multiply the elements of the given input tuples, and store
the results in the given result tuple.
|
static MutableLongTuple |
LongTuples.negate(LongTuple t0,
MutableLongTuple result)
Negates the given tuple, and store the result in the given result tuple.
|
static long |
LongTupleFunctions.reduce(LongTuple t0,
long identity,
java.util.function.LongBinaryOperator 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 MutableLongTuple |
LongTuples.reverse(LongTuple t,
MutableLongTuple result)
Reverse the given tuple.
|
static LongTuple |
LongTuples.reversed(LongTuple t)
Creates a new tuple that is a reversed view on the given
tuple.
|
default void |
MutableLongTuple.set(LongTuple other)
Set this tuple to be equal to the given one.
|
static MutableLongTuple |
LongTuples.subtract(LongTuple t0,
long value,
MutableLongTuple result)
Subtract the given value from all elements of the given input
tuple, and store the result in the given result tuple.
|
static MutableLongTuple |
LongTuples.subtract(LongTuple t0,
LongTuple t1,
MutableLongTuple result)
Subtract the given input tuples, and store the result in
the given result tuple.
|
static long[] |
LongTuples.toArray(LongTuple t)
Creates a new array from the contents of the given tuple
|
static MutableDoubleTuple |
LongTuples.toDoubleTuple(LongTuple longTuple)
Convert the given
LongTuple into a DoubleTuple |
static String |
LongTuples.toString(LongTuple tuple,
int maxNumLeadingElements,
int maxNumTrailingElements)
Returns a string representation of the given tuple using
LongTuples.toString(LongTuple, Locale, String, int, int) with
the default locale and format. |
static String |
LongTuples.toString(LongTuple tuple,
Locale locale,
String format,
int maxNumLeadingElements,
int maxNumTrailingElements)
Returns a string representation of the given tuple.
|
| Modifier and Type | Method and Description |
|---|---|
static MutableLongTuple |
LongTupleCollections.add(Collection<? extends LongTuple> tuples,
MutableLongTuple result)
Computes the component-wise sum of the given collection
of tuples.
|
static List<MutableLongTuple> |
LongTupleCollections.deepCopy(Collection<? extends LongTuple> tuples)
Returns a deep copy of the given collection of tuples.
|
static MutableLongTuple |
LongTupleCollections.max(Collection<? extends LongTuple> tuples,
MutableLongTuple result)
Computes the component-wise maximum of the given collection
of tuples.
|
static MutableLongTuple |
LongTupleCollections.min(Collection<? extends LongTuple> tuples,
MutableLongTuple result)
Computes the component-wise minimum of the given collection
of tuples.
|
Copyright © 2015. All Rights Reserved.