Package io.github.hakkelt.bartwrapper
Class BartNDArrayReshapeView
- java.lang.Object
-
- io.github.hakkelt.ndarrays.internal.AbstractNDArray<T,T2>
-
- io.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
- io.github.hakkelt.bartwrapper.BartNDArrayReshapeView
-
- All Implemented Interfaces:
BartNDArray,BartNDArrayView,io.github.hakkelt.ndarrays.ComplexNDArray<Float>,io.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>,Iterable<org.apache.commons.math3.complex.Complex>
public class BartNDArrayReshapeView extends io.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float> implements BartNDArray, BartNDArrayView
A view for a ComplexNDArray that changes the shape of the parent NDArray. When reshape(...) is called for a ComplexNDArray, an instance of this class is returned.
-
-
Constructor Summary
Constructors Constructor Description BartNDArrayReshapeView(BartNDArray parent, int... newShape)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BartNDArrayapply(UnaryOperator<org.apache.commons.math3.complex.Complex> func)BartNDArrayapplyOnComplexSlices(BiFunction<io.github.hakkelt.ndarrays.ComplexNDArray<Float>,int[],io.github.hakkelt.ndarrays.NDArray<?>> func, int... iterationDims)io.github.hakkelt.ndarrays.NDArray<T>applyOnSlices(BiFunction<io.github.hakkelt.ndarrays.NDArray<T>,int[],io.github.hakkelt.ndarrays.NDArray<?>> arg0, int... arg1)BartNDArrayapplyWithCartesianIndices(BiFunction<org.apache.commons.math3.complex.Complex,int[],org.apache.commons.math3.complex.Complex> func)BartNDArrayapplyWithLinearIndices(BiFunction<org.apache.commons.math3.complex.Complex,Integer,org.apache.commons.math3.complex.Complex> func)booleanareBartDimsSpecified()Checks if meaning of dimensions are specified in BART or not.BartNDArraycopy()BartNDArraycreateNewNDArrayOfSameTypeAsMe(int... shape)StringdataTypeAsString()Class<?>dtype()Class<?>dtype2()booleanequals(Object obj)BartNDArrayfillUsingCartesianIndices(Function<int[],org.apache.commons.math3.complex.Complex> func)BartNDArrayfillUsingLinearIndices(IntFunction<org.apache.commons.math3.complex.Complex> func)BartDimsEnum[]getBartDims()Returns an array of BartDimsEnum that tells the meaning of each dimensions in BART.StringgetNamePrefix()io.github.hakkelt.ndarrays.internal.AbstractNDArray<T,T2>getParent()inthashCode()int[]linearIndexToViewIndices(int arg0)BartNDArraymapOnComplexSlices(BiFunction<io.github.hakkelt.ndarrays.ComplexNDArray<Float>,int[],io.github.hakkelt.ndarrays.NDArray<?>> func, int... iterationDims)io.github.hakkelt.ndarrays.NDArray<T>mapOnSlices(BiFunction<io.github.hakkelt.ndarrays.NDArray<T>,int[],io.github.hakkelt.ndarrays.NDArray<?>> arg0, int... arg1)voidsetBartDims(BartDimsEnum... bartDims)Sets the meaning of dimensions.BartNDArraysimilar()-
Methods inherited from class io.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView
abs, argument, imaginary, real, reduceComplexSlices, set, set, setImag, setImag, setReal, setReal
-
Methods inherited from class io.github.hakkelt.ndarrays.internal.AbstractNDArray
accumulate, contains, contentToString, contentToString, forEach, forEachWithCartesianIndices, forEachWithLinearIndices, get, get, getImag, getImag, getReal, getReal, iterator, length, maybeParallelStream, ndim, norm, norm, parallelStream, prod, reduceSlices, set, set, shape, shape, spliterator, stream, streamCartesianIndices, streamLinearIndices, sum, toArray, toArray, toArray, toString, writeToFile
-
Methods inherited from interface io.github.hakkelt.bartwrapper.BartNDArray
add, add, add, add, add, add, add, add, addInplace, addInplace, addInplace, addInplace, addInplace, addInplace, addInplace, addInplace, concatenate, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, divide, divide, divide, divide, divide, divide, divide, divide, divideInplace, divideInplace, divideInplace, divideInplace, divideInplace, divideInplace, divideInplace, divideInplace, dropDims, fill, fill, fill, inverseMask, map, mapWithCartesianIndices, mapWithLinearIndices, mask, mask, maskWithCartesianIndices, maskWithLinearIndices, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiplyInplace, multiplyInplace, multiplyInplace, multiplyInplace, multiplyInplace, multiplyInplace, multiplyInplace, multiplyInplace, permuteDims, reshape, selectAndReorderBartDims, selectDims, slice, squeeze, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtractInplace, subtractInplace, subtractInplace, subtractInplace, subtractInplace, subtractInplace, subtractInplace, subtractInplace, sum
-
Methods inherited from interface io.github.hakkelt.ndarrays.ComplexNDArray
abs, accumulate, argument, contentToString, dtype2, getImag, getImag, getReal, getReal, imaginary, prod, real, reduceComplexSlices, setImag, setImag, setReal, setReal
-
Methods inherited from interface io.github.hakkelt.ndarrays.NDArray
accumulate, applyOnSlices, contains, contentToString, dataTypeAsString, dtype, forEach, forEachWithCartesianIndices, forEachWithLinearIndices, get, get, getNamePrefix, iterator, length, mapOnSlices, ndim, norm, norm, norm, parallelStream, prod, reduceSlices, set, set, set, set, shape, shape, spliterator, stream, streamCartesianIndices, streamLinearIndices, sum, toArray, toArray, toArray, toString, writeToFile
-
-
-
-
Constructor Detail
-
BartNDArrayReshapeView
public BartNDArrayReshapeView(BartNDArray parent, int... newShape)
-
-
Method Detail
-
similar
public BartNDArray similar()
- Specified by:
similarin interfaceBartNDArray- Specified by:
similarin interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>- Specified by:
similarin interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>- Overrides:
similarin classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
copy
public BartNDArray copy()
- Specified by:
copyin interfaceBartNDArray- Specified by:
copyin interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>- Specified by:
copyin interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>- Overrides:
copyin classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
areBartDimsSpecified
public boolean areBartDimsSpecified()
Description copied from interface:BartNDArrayChecks if meaning of dimensions are specified in BART or not.- Specified by:
areBartDimsSpecifiedin interfaceBartNDArray- Returns:
- true if the meaning of dimensions in BART are specified
-
getBartDims
public BartDimsEnum[] getBartDims()
Description copied from interface:BartNDArrayReturns an array of BartDimsEnum that tells the meaning of each dimensions in BART.- Specified by:
getBartDimsin interfaceBartNDArray- Returns:
- an array of BartDimsEnum that tells the meaning of each dimensions in BART
-
setBartDims
public void setBartDims(BartDimsEnum... bartDims)
Description copied from interface:BartNDArraySets the meaning of dimensions.- Specified by:
setBartDimsin interfaceBartNDArray- Parameters:
bartDims- meaning of dimensions in BART.
-
createNewNDArrayOfSameTypeAsMe
public BartNDArray createNewNDArrayOfSameTypeAsMe(int... shape)
- Specified by:
createNewNDArrayOfSameTypeAsMein interfaceBartNDArrayView
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
-
apply
public BartNDArray apply(UnaryOperator<org.apache.commons.math3.complex.Complex> func)
- Specified by:
applyin interfaceBartNDArray- Specified by:
applyin interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>- Specified by:
applyin interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>- Overrides:
applyin classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
applyWithLinearIndices
public BartNDArray applyWithLinearIndices(BiFunction<org.apache.commons.math3.complex.Complex,Integer,org.apache.commons.math3.complex.Complex> func)
- Specified by:
applyWithLinearIndicesin interfaceBartNDArray- Specified by:
applyWithLinearIndicesin interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>- Specified by:
applyWithLinearIndicesin interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>- Overrides:
applyWithLinearIndicesin classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
applyWithCartesianIndices
public BartNDArray applyWithCartesianIndices(BiFunction<org.apache.commons.math3.complex.Complex,int[],org.apache.commons.math3.complex.Complex> func)
- Specified by:
applyWithCartesianIndicesin interfaceBartNDArray- Specified by:
applyWithCartesianIndicesin interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>- Specified by:
applyWithCartesianIndicesin interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>- Overrides:
applyWithCartesianIndicesin classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
fillUsingLinearIndices
public BartNDArray fillUsingLinearIndices(IntFunction<org.apache.commons.math3.complex.Complex> func)
- Specified by:
fillUsingLinearIndicesin interfaceBartNDArray- Specified by:
fillUsingLinearIndicesin interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>- Specified by:
fillUsingLinearIndicesin interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>- Overrides:
fillUsingLinearIndicesin classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
fillUsingCartesianIndices
public BartNDArray fillUsingCartesianIndices(Function<int[],org.apache.commons.math3.complex.Complex> func)
- Specified by:
fillUsingCartesianIndicesin interfaceBartNDArray- Specified by:
fillUsingCartesianIndicesin interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>- Specified by:
fillUsingCartesianIndicesin interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>- Overrides:
fillUsingCartesianIndicesin classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
applyOnComplexSlices
public BartNDArray applyOnComplexSlices(BiFunction<io.github.hakkelt.ndarrays.ComplexNDArray<Float>,int[],io.github.hakkelt.ndarrays.NDArray<?>> func, int... iterationDims)
- Specified by:
applyOnComplexSlicesin interfaceBartNDArray- Specified by:
applyOnComplexSlicesin interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>- Overrides:
applyOnComplexSlicesin classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
mapOnComplexSlices
public BartNDArray mapOnComplexSlices(BiFunction<io.github.hakkelt.ndarrays.ComplexNDArray<Float>,int[],io.github.hakkelt.ndarrays.NDArray<?>> func, int... iterationDims)
- Specified by:
mapOnComplexSlicesin interfaceBartNDArray- Specified by:
mapOnComplexSlicesin interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>- Overrides:
mapOnComplexSlicesin classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
mapOnSlices
public io.github.hakkelt.ndarrays.NDArray<T> mapOnSlices(BiFunction<io.github.hakkelt.ndarrays.NDArray<T>,int[],io.github.hakkelt.ndarrays.NDArray<?>> arg0, int... arg1)
-
applyOnSlices
public io.github.hakkelt.ndarrays.NDArray<T> applyOnSlices(BiFunction<io.github.hakkelt.ndarrays.NDArray<T>,int[],io.github.hakkelt.ndarrays.NDArray<?>> arg0, int... arg1)
-
getNamePrefix
public String getNamePrefix()
-
dtype
public Class<?> dtype()
-
dtype2
public Class<?> dtype2()
-
dataTypeAsString
public String dataTypeAsString()
-
getParent
public io.github.hakkelt.ndarrays.internal.AbstractNDArray<T,T2> getParent()
-
linearIndexToViewIndices
public int[] linearIndexToViewIndices(int arg0)
-
-