Class ViewOperations<T,T2 extends Number>
- java.lang.Object
-
- io.github.hakkelt.ndarrays.internal.ViewOperations<T,T2>
-
-
Constructor Summary
Constructors Constructor Description ViewOperations()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
checkDroppedDims(int ndim, int... droppedDims)
static void
checkSelectedDims(int ndim, int... selectedDims)
ComplexNDArray<T2>
dropDims(ComplexNDArray<T2> me, int... droppedDims)
NDArray<T>
dropDims(AbstractNDArray<T,T2> me, int... droppedDims)
static int[]
getIndicesOfSingletonDims(int... shape)
static List<Integer>
intArrayToList(int[] array)
static Set<Integer>
intArrayToSet(int[] array)
ComplexNDArray<T2>
internalSlice(ComplexNDArray<T2> me, NormalizedRange[] slicingExpressions)
NDArray<T2>
internalSlice(RealNDArray<T2> me, NormalizedRange[] slicingExpressions)
static boolean
isThisPermutationAnIdentityOperation(int... permutation)
static boolean
isThisReshapingAnIdentityOperation(int[] shape, int[] newShape)
static boolean
isThisSlicingAnIdentityOperation(NDArray<?> me, NormalizedRange[] slicingExpressions)
ComplexNDArray<T2>
mask(ComplexNDArray<T2> me, NDArray<?> mask, boolean isInverse)
ComplexNDArray<T2>
mask(ComplexNDArray<T2> me, BiPredicate<org.apache.commons.math3.complex.Complex,?> func, boolean withLinearIndices)
ComplexNDArray<T2>
mask(ComplexNDArray<T2> me, Predicate<org.apache.commons.math3.complex.Complex> func)
NDArray<T2>
mask(RealNDArray<T2> me, NDArray<?> mask, boolean isInverse)
NDArray<T2>
mask(RealNDArray<T2> me, BiPredicate<T2,?> func, boolean withLinearIndices)
NDArray<T2>
mask(RealNDArray<T2> me, Predicate<T2> func)
ComplexNDArray<T2>
permuteDims(ComplexNDArray<T2> me, int... permutation)
NDArray<T2>
permuteDims(RealNDArray<T2> me, int... permutation)
ComplexNDArray<T2>
reshape(ComplexNDArray<T2> me, int... newShape)
NDArray<T2>
reshape(RealNDArray<T2> me, int... newShape)
ComplexNDArray<T2>
selectDims(ComplexNDArray<T2> me, int... selectedDims)
NDArray<T>
selectDims(AbstractNDArray<T,T2> me, int... selectedDims)
static Object[]
selectedDimsToSlicingExpression(int[] shape, Set<Integer> selectedDims)
ComplexNDArray<T2>
slice(ComplexNDArray<T2> me, Object... slicingExpressions)
NDArray<T2>
slice(RealNDArray<T2> me, Object... slicingExpressions)
ComplexNDArray<T2>
squeeze(ComplexNDArray<T2> me)
NDArray<T>
squeeze(AbstractNDArray<T,T2> me)
-
-
-
Method Detail
-
isThisSlicingAnIdentityOperation
public static boolean isThisSlicingAnIdentityOperation(NDArray<?> me, NormalizedRange[] slicingExpressions)
-
isThisPermutationAnIdentityOperation
public static boolean isThisPermutationAnIdentityOperation(int... permutation)
-
isThisReshapingAnIdentityOperation
public static boolean isThisReshapingAnIdentityOperation(int[] shape, int[] newShape)
-
checkSelectedDims
public static void checkSelectedDims(int ndim, int... selectedDims)
-
checkDroppedDims
public static void checkDroppedDims(int ndim, int... droppedDims)
-
getIndicesOfSingletonDims
public static int[] getIndicesOfSingletonDims(int... shape)
-
selectedDimsToSlicingExpression
public static Object[] selectedDimsToSlicingExpression(int[] shape, Set<Integer> selectedDims)
-
internalSlice
public NDArray<T2> internalSlice(RealNDArray<T2> me, NormalizedRange[] slicingExpressions)
-
internalSlice
public ComplexNDArray<T2> internalSlice(ComplexNDArray<T2> me, NormalizedRange[] slicingExpressions)
-
slice
public NDArray<T2> slice(RealNDArray<T2> me, Object... slicingExpressions)
-
slice
public ComplexNDArray<T2> slice(ComplexNDArray<T2> me, Object... slicingExpressions)
-
mask
public NDArray<T2> mask(RealNDArray<T2> me, NDArray<?> mask, boolean isInverse)
-
mask
public ComplexNDArray<T2> mask(ComplexNDArray<T2> me, NDArray<?> mask, boolean isInverse)
-
mask
public ComplexNDArray<T2> mask(ComplexNDArray<T2> me, Predicate<org.apache.commons.math3.complex.Complex> func)
-
mask
public NDArray<T2> mask(RealNDArray<T2> me, BiPredicate<T2,?> func, boolean withLinearIndices)
-
mask
public ComplexNDArray<T2> mask(ComplexNDArray<T2> me, BiPredicate<org.apache.commons.math3.complex.Complex,?> func, boolean withLinearIndices)
-
permuteDims
public NDArray<T2> permuteDims(RealNDArray<T2> me, int... permutation)
-
permuteDims
public ComplexNDArray<T2> permuteDims(ComplexNDArray<T2> me, int... permutation)
-
reshape
public NDArray<T2> reshape(RealNDArray<T2> me, int... newShape)
-
reshape
public ComplexNDArray<T2> reshape(ComplexNDArray<T2> me, int... newShape)
-
selectDims
public NDArray<T> selectDims(AbstractNDArray<T,T2> me, int... selectedDims)
-
selectDims
public ComplexNDArray<T2> selectDims(ComplexNDArray<T2> me, int... selectedDims)
-
dropDims
public NDArray<T> dropDims(AbstractNDArray<T,T2> me, int... droppedDims)
-
dropDims
public ComplexNDArray<T2> dropDims(ComplexNDArray<T2> me, int... droppedDims)
-
squeeze
public NDArray<T> squeeze(AbstractNDArray<T,T2> me)
-
squeeze
public ComplexNDArray<T2> squeeze(ComplexNDArray<T2> me)
-
-