Class 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 Detail

      • BartNDArrayReshapeView

        public BartNDArrayReshapeView​(BartNDArray parent,
                                      int... newShape)
    • Method Detail

      • similar

        public BartNDArray similar()
        Specified by:
        similar in interface BartNDArray
        Specified by:
        similar in interface io.github.hakkelt.ndarrays.ComplexNDArray<Float>
        Specified by:
        similar in interface io.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
        Overrides:
        similar in class io.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
      • copy

        public BartNDArray copy()
        Specified by:
        copy in interface BartNDArray
        Specified by:
        copy in interface io.github.hakkelt.ndarrays.ComplexNDArray<Float>
        Specified by:
        copy in interface io.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
        Overrides:
        copy in class io.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 interface BartNDArray
        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 interface BartNDArray
        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 interface BartNDArray
        Parameters:
        bartDims - meaning of dimensions in BART.
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface io.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface io.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 interface BartNDArray
        Specified by:
        apply in interface io.github.hakkelt.ndarrays.ComplexNDArray<Float>
        Specified by:
        apply in interface io.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
        Overrides:
        apply in class io.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 interface BartNDArray
        Specified by:
        applyWithLinearIndices in interface io.github.hakkelt.ndarrays.ComplexNDArray<Float>
        Specified by:
        applyWithLinearIndices in interface io.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
        Overrides:
        applyWithLinearIndices in class io.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 interface BartNDArray
        Specified by:
        applyWithCartesianIndices in interface io.github.hakkelt.ndarrays.ComplexNDArray<Float>
        Specified by:
        applyWithCartesianIndices in interface io.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
        Overrides:
        applyWithCartesianIndices in class io.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
      • fillUsingLinearIndices

        public BartNDArray fillUsingLinearIndices​(IntFunction<org.apache.commons.math3.complex.Complex> func)
        Specified by:
        fillUsingLinearIndices in interface BartNDArray
        Specified by:
        fillUsingLinearIndices in interface io.github.hakkelt.ndarrays.ComplexNDArray<Float>
        Specified by:
        fillUsingLinearIndices in interface io.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
        Overrides:
        fillUsingLinearIndices in class io.github.hakkelt.ndarrays.internal.ComplexNDArrayReshapeView<Float>
      • fillUsingCartesianIndices

        public BartNDArray fillUsingCartesianIndices​(Function<int[],​org.apache.commons.math3.complex.Complex> func)
        Specified by:
        fillUsingCartesianIndices in interface BartNDArray
        Specified by:
        fillUsingCartesianIndices in interface io.github.hakkelt.ndarrays.ComplexNDArray<Float>
        Specified by:
        fillUsingCartesianIndices in interface io.github.hakkelt.ndarrays.NDArray<org.apache.commons.math3.complex.Complex>
        Overrides:
        fillUsingCartesianIndices in class io.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 interface BartNDArray
        Specified by:
        applyOnComplexSlices in interface io.github.hakkelt.ndarrays.ComplexNDArray<Float>
        Overrides:
        applyOnComplexSlices in class io.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 interface BartNDArray
        Specified by:
        mapOnComplexSlices in interface io.github.hakkelt.ndarrays.ComplexNDArray<Float>
        Overrides:
        mapOnComplexSlices in class io.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)
        Specified by:
        mapOnSlices in interface io.github.hakkelt.ndarrays.NDArray<T extends Object>
        Overrides:
        mapOnSlices in class io.github.hakkelt.ndarrays.internal.AbstractNDArray<T extends Object,​T2 extends Number>
      • 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)
        Specified by:
        applyOnSlices in interface io.github.hakkelt.ndarrays.NDArray<T extends Object>
        Overrides:
        applyOnSlices in class io.github.hakkelt.ndarrays.internal.AbstractNDArray<T extends Object,​T2 extends Number>
      • 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)