cc.redberry.core.tensor
Class MultiTensor
- java.lang.Object
-
- cc.redberry.core.tensor.Tensor
-
- cc.redberry.core.tensor.MultiTensor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description IndicesgetIndices()Returns indices of this tensor.abstract Tensorremove(int position)Removes tensor at the specified position and returns the result.Tensorremove(int[] positions)Removes tensors at the specified positions and returns the result.Tensorremove(Tensor tensor)Removes the first occurrence of the specified tensor (reference) from this list, if it is present.Tensorselect(int[] positions)Selects tensors at the specified positions and puts it together.
-
-
-
Method Detail
-
getIndices
public Indices getIndices()
Description copied from class:TensorReturns indices of this tensor.- Specified by:
getIndicesin classTensor- Returns:
- indices of this tensor
-
remove
public abstract Tensor remove(int position)
Removes tensor at the specified position and returns the result.- Parameters:
position- position in tensor- Returns:
- result of removing
-
remove
public Tensor remove(Tensor tensor)
Removes the first occurrence of the specified tensor (reference) from this list, if it is present. If the tensor does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that t == get(i) (if such an element exists).- Parameters:
tensor- specified reference- Returns:
- result of removing
-
remove
public Tensor remove(int[] positions)
Removes tensors at the specified positions and returns the result.- Parameters:
positions- position in tensor- Returns:
- result of removing
- Throws:
java.lang.IndexOutOfBoundsException
-
select
public Tensor select(int[] positions)
Selects tensors at the specified positions and puts it together.- Parameters:
positions- positions in tensor- Returns:
- result subtensor
-
-
DataMelt 3.0 © DataMelt by jWork.ORG