public class ImmutableDoubleArrayBackedTensor extends AbstractTensor<java.lang.Double>
Modifier and Type | Class and Description |
---|---|
static class |
ImmutableDoubleArrayBackedTensor.Builder
A builder for tensor which only will contain doubles
|
Constructor and Description |
---|
ImmutableDoubleArrayBackedTensor(ImmutableDoubleArrayBackedTensor.Builder builder) |
Modifier and Type | Method and Description |
---|---|
static ImmutableDoubleArrayBackedTensor.Builder |
builder(PositionIndexer indexer) |
boolean |
contains(Position position)
Returns
true if the tensoric object contains the given position, false otherwise. |
Position |
context()
Retrieves the context of the tensor, which is nothing else than a position.
|
java.lang.Double |
get(java.lang.Object... coordinates) |
java.lang.Double |
get(Position position) |
Shape |
shape()
Retrieves the shape of the tensor.
|
equals, hashCode
public ImmutableDoubleArrayBackedTensor(ImmutableDoubleArrayBackedTensor.Builder builder)
public java.lang.Double get(Position position)
position
- the position in the N-dimensional space where to find the value.public java.lang.Double get(java.lang.Object... coordinates)
coordinates
- form N-dimensional space where to find the value.public Shape shape()
Tensor
Implementations have to take care that the returned value here is never null
.
public Position context()
Tensor
Implementations have to guarantee that the returned value here is never null
.
public boolean contains(Position position)
Tensoric
true
if the tensoric object contains the given position, false
otherwise.position
- the position to be checkedtrue
if the position is contained in the tensoric object, false
otherwise.public static ImmutableDoubleArrayBackedTensor.Builder builder(PositionIndexer indexer)