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 BartNDArray
apply(UnaryOperator<org.apache.commons.math3.complex.Complex> func)
BartNDArray
applyOnComplexSlices(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)
BartNDArray
applyWithCartesianIndices(BiFunction<org.apache.commons.math3.complex.Complex,int[],org.apache.commons.math3.complex.Complex> func)
BartNDArray
applyWithLinearIndices(BiFunction<org.apache.commons.math3.complex.Complex,Integer,org.apache.commons.math3.complex.Complex> func)
boolean
areBartDimsSpecified()
Checks if meaning of dimensions are specified in BART or not.BartNDArray
copy()
BartNDArray
createNewNDArrayOfSameTypeAsMe(int... shape)
String
dataTypeAsString()
Class<?>
dtype()
Class<?>
dtype2()
boolean
equals(Object obj)
BartNDArray
fillUsingCartesianIndices(Function<int[],org.apache.commons.math3.complex.Complex> func)
BartNDArray
fillUsingLinearIndices(IntFunction<org.apache.commons.math3.complex.Complex> func)
BartDimsEnum[]
getBartDims()
Returns an array of BartDimsEnum that tells the meaning of each dimensions in BART.String
getNamePrefix()
io.github.hakkelt.ndarrays.internal.AbstractNDArray<T,T2>
getParent()
int
hashCode()
int[]
linearIndexToViewIndices(int arg0)
BartNDArray
mapOnComplexSlices(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)
void
setBartDims(BartDimsEnum... bartDims)
Sets the meaning of dimensions.BartNDArray
similar()
-
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:
similar
in interfaceBartNDArray
- Specified by:
similar
in interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>
- Specified by:
similar
in interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
- Overrides:
similar
in classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
copy
public BartNDArray copy()
- Specified by:
copy
in interfaceBartNDArray
- Specified by:
copy
in interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>
- Specified by:
copy
in interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
- Overrides:
copy
in classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
areBartDimsSpecified
public boolean areBartDimsSpecified()
Description copied from interface:BartNDArray
Checks if meaning of dimensions are specified in BART or not.- Specified by:
areBartDimsSpecified
in interfaceBartNDArray
- Returns:
- true if the meaning of dimensions in BART are specified
-
getBartDims
public BartDimsEnum[] getBartDims()
Description copied from interface:BartNDArray
Returns an array of BartDimsEnum that tells the meaning of each dimensions in BART.- Specified by:
getBartDims
in 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:BartNDArray
Sets the meaning of dimensions.- Specified by:
setBartDims
in interfaceBartNDArray
- Parameters:
bartDims
- meaning of dimensions in BART.
-
createNewNDArrayOfSameTypeAsMe
public BartNDArray createNewNDArrayOfSameTypeAsMe(int... shape)
- Specified by:
createNewNDArrayOfSameTypeAsMe
in interfaceBartNDArrayView
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in 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:
apply
in interfaceBartNDArray
- Specified by:
apply
in interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>
- Specified by:
apply
in interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
- Overrides:
apply
in 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:
applyWithLinearIndices
in interfaceBartNDArray
- Specified by:
applyWithLinearIndices
in interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>
- Specified by:
applyWithLinearIndices
in interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
- Overrides:
applyWithLinearIndices
in 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:
applyWithCartesianIndices
in interfaceBartNDArray
- Specified by:
applyWithCartesianIndices
in interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>
- Specified by:
applyWithCartesianIndices
in interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
- Overrides:
applyWithCartesianIndices
in classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
fillUsingLinearIndices
public BartNDArray fillUsingLinearIndices(IntFunction<org.apache.commons.math3.complex.Complex> func)
- Specified by:
fillUsingLinearIndices
in interfaceBartNDArray
- Specified by:
fillUsingLinearIndices
in interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>
- Specified by:
fillUsingLinearIndices
in interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
- Overrides:
fillUsingLinearIndices
in classio.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
-
fillUsingCartesianIndices
public BartNDArray fillUsingCartesianIndices(Function<int[],org.apache.commons.math3.complex.Complex> func)
- Specified by:
fillUsingCartesianIndices
in interfaceBartNDArray
- Specified by:
fillUsingCartesianIndices
in interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>
- Specified by:
fillUsingCartesianIndices
in interfaceio.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
- Overrides:
fillUsingCartesianIndices
in 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:
applyOnComplexSlices
in interfaceBartNDArray
- Specified by:
applyOnComplexSlices
in interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>
- Overrides:
applyOnComplexSlices
in 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:
mapOnComplexSlices
in interfaceBartNDArray
- Specified by:
mapOnComplexSlices
in interfaceio.github.hakkelt.ndarrays.ComplexNDArray<Float>
- Overrides:
mapOnComplexSlices
in 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)
-
-