public final class Tensorbackeds
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <V,TB extends Tensorbacked<V>> |
builderFor(java.lang.Class<TB> tensorbackedClass)
Creates a new builder for the given tensor backed class.
|
static <S,TB extends Tensorbacked<S>> |
complete(TB tensorbacked)
Starting point for a fluent clause to complete a tensorbacked object with other values.
|
static <V,TB extends Tensorbacked<V>> |
construct(java.lang.Class<TB> tensorbackedClass)
Starting point for a fluent clause to construct tensor backed objects by different means from other objects.
|
static <TB extends Tensorbacked<?>> |
dimensionalityOf(TB tensorbacked)
A convenience method to retrieve the number of dimensions of a tensor backed object.
|
static <T extends Tensorbacked<?>> |
dimensionsOf(java.lang.Class<T> tensorBackedClass)
Retrieves the dimensions from the given class inheriting from tensor backed.
|
static <V,TB extends Tensorbacked<V>> |
empty(java.lang.Class<TB> tensorbackedClass)
Creates a new empty instance of a tensorbacked class of the given type.
|
static <S> Tensor<com.google.common.base.Optional<S>> |
errorsOf(Tensorbacked<QuantifiedValue<S>> tensorbacked)
Retrieves the errors from the tensorbacked object.
|
static <V,TB extends Tensorbacked<V>> |
filter(TB tensorbacked) |
static <S> OngoingFlattening<S> |
flatten(Tensorbacked<S> tensorbacked)
Starting for a fluent clause, that allows to flatten one or multiple dimensions of the internal tensor of the
tensor backed object into maps or tensors of lists.
|
static <TB extends Tensorbacked<E>,TBOUT extends Tensorbacked<E>,E> |
mergeTo(java.lang.Iterable<TB> toBeMerged,
java.lang.Class<TBOUT> classToReturn)
Deprecated.
use construct(classToReturn).byMergingTb(toBeMerged);
|
static java.util.Set<Position> |
positionsOf(Tensorbacked<?> tensorbacked)
Retrieves a set of all positions within a tensorbacked class.
|
static <V,TB extends Tensorbacked<V>> |
setContext(TB tensorbacked,
Position context) |
static Shape |
shapeOf(Tensorbacked<?> tensorbacked)
Retrieves the shape of the tensor backed object.
|
static <TB extends Tensorbacked<?>> |
shapesOf(java.lang.Iterable<TB> tensorbackeds)
Retrieves all the shapes of the given tensorbacked objects.
|
static <TB extends Tensorbacked<?>> |
sizeOf(TB tensorbacked)
A convenience method to retrieve the size (number of entries) of a tensor backed object.
|
static <V,TB extends Tensorbacked<V>> |
stripContext(TB tensorbacked) |
static <S> java.lang.Iterable<Tensor<S>> |
tensorsOf(java.lang.Iterable<? extends Tensorbacked<S>> tensorbackeds)
Retrieves the tensor from each tensorbacked in the given iterable and returns them in a new iterable.
|
static <S> Unit |
unitOf(Tensorbacked<QuantifiedValue<S>> tensorbacked)
Retrieves the base of a tensorbacked object by looking at the underlaying tensor.
|
static <S> Tensor<java.lang.Boolean> |
validitiesOf(Tensorbacked<QuantifiedValue<S>> tensorbacked)
Retrieves the validities from a tensorbacked object which contains quantities as values.
|
static <S> Tensor<S> |
valuesOf(Tensorbacked<QuantifiedValue<S>> tensorbacked)
Retrieves the values of a tensorbacked object which contains quantities as values.
|
public static <V,TB extends Tensorbacked<V>> TensorbackedBuilder<V,TB> builderFor(java.lang.Class<TB> tensorbackedClass)
tensorbackedClass - the type of tensor backed object to be created.public static <T extends Tensorbacked<?>> java.util.Set<java.lang.Class<?>> dimensionsOf(java.lang.Class<T> tensorBackedClass)
Dimensions annotation.tensorBackedClass - the class for which to determine the dimensionspublic static <TB extends Tensorbacked<?>> int sizeOf(TB tensorbacked)
tensorbacked - the tensor backed object for which to retrieve the sizepublic static <TB extends Tensorbacked<?>> int dimensionalityOf(TB tensorbacked)
tensorbacked - the tensor backed object from which to retrieve the dimensionspublic static <V,TB extends Tensorbacked<V>> TB empty(java.lang.Class<TB> tensorbackedClass)
TensorbackedBuilder.build() on an empty builder.tensorbackedClass - the class of the tensor backed object to createpublic static <V,TB extends Tensorbacked<V>> OngoingTensorbackedConstruction<V,TB> construct(java.lang.Class<TB> tensorbackedClass)
// Assume that Orbit and OrbitTimeseries are tensorbacked objects
List<> orbits = new ArrayList<>();
// assume the list is filled
OrbitTimeseries orbitTimeseries = construct(OrbitTimeseries.class).byMerging(orbits);
tensorbackedClass - the type of the tensorbacked object that should be constructedpublic static <S> Tensor<java.lang.Boolean> validitiesOf(Tensorbacked<QuantifiedValue<S>> tensorbacked)
QuantityTensors.validitiesOf(Tensor) method on the tensor contained in the
tensorbacked.tensorbacked - the tensorbacked class from which to get the validitiespublic static <S> Tensor<S> valuesOf(Tensorbacked<QuantifiedValue<S>> tensorbacked)
QuantityTensors.valuesOf(Tensor) on the tensor backing the tensorbacked object.tensorbacked - the tensorbacked object from which to retrieve the valuespublic static <S> Tensor<com.google.common.base.Optional<S>> errorsOf(Tensorbacked<QuantifiedValue<S>> tensorbacked)
QuantityTensors.errorsOf(Tensor) on the tensor backing the tensorbacked object.tensorbacked - the tensorbacked object from which to retrieve the errorspublic static <S> Unit unitOf(Tensorbacked<QuantifiedValue<S>> tensorbacked)
tensorbacked - the tensorbacked object from which to retrieve the basejava.lang.IllegalArgumentException - if the base cannot be determinedpublic static java.util.Set<Position> positionsOf(Tensorbacked<?> tensorbacked)
tensorbacked - the tensor backed objectpublic static final Shape shapeOf(Tensorbacked<?> tensorbacked)
tensorbacked - the tensorbacke object from which to retrieve the shapepublic static final <TB extends Tensorbacked<?>> java.lang.Iterable<Shape> shapesOf(java.lang.Iterable<TB> tensorbackeds)
tensorbackeds - the tensorbacked objects from which to get the shapespublic static final <S> OngoingFlattening<S> flatten(Tensorbacked<S> tensorbacked)
tensorbacked - the tensor backed object whose internal tensor is subject to flattening of valuespublic static final <S> java.lang.Iterable<Tensor<S>> tensorsOf(java.lang.Iterable<? extends Tensorbacked<S>> tensorbackeds)
tensorbackeds - the iterable of tensorbackeds from which to retrieve the tensorspublic static final <S,TB extends Tensorbacked<S>> OngoingTensorbackedCompletion<TB,S> complete(TB tensorbacked)
tensorbacked - the tensor backed object to complete@Deprecated public static <TB extends Tensorbacked<E>,TBOUT extends Tensorbacked<E>,E> TBOUT mergeTo(java.lang.Iterable<TB> toBeMerged, java.lang.Class<TBOUT> classToReturn)
Tensorbackeds into one Tensorbacked of the given class. The resulting dimensions
must match the dimensions required by the resulting object's class.
toBeMerged - the tensor backed objects that shall be merged into oneclassToReturn - the type of the tensor backed that should be resulting from the mergeconstruct(Class)public static final <V,TB extends Tensorbacked<V>> TB stripContext(TB tensorbacked)
public static <V,TB extends Tensorbacked<V>> TB setContext(TB tensorbacked, Position context)
public static final <V,TB extends Tensorbacked<V>> OngoingTensorbackedFiltering<V,TB> filter(TB tensorbacked)