Class AbstractNDArrayView<T,T2 extends Number>
- java.lang.Object
-
- io.github.hakkelt.ndarrays.internal.AbstractNDArray<T,T2>
-
- io.github.hakkelt.ndarrays.internal.AbstractNDArrayView<T,T2>
-
- Direct Known Subclasses:
AbstractNDArrayMaskView
,AbstractNDArrayPermuteDimsView
,AbstractNDArrayReshapeView
,AbstractNDArraySliceView
public abstract class AbstractNDArrayView<T,T2 extends Number> extends AbstractNDArray<T,T2>
-
-
Constructor Summary
Constructors Constructor Description AbstractNDArrayView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NDArray<T>
copy()
Returns a copy of this NDArray.String
dataTypeAsString()
Returns a String representation of element type.Class<?>
dtype()
Returns the type of values returned by get method.Class<?>
dtype2()
boolean
equals(Object obj)
Compares the specified object with this NDArray for equality.String
getNamePrefix()
Returns a string that identifies the implementation behind this current object.AbstractNDArray<T,T2>
getParent()
AbstractNDArray<T,T2>
getTopMostParent()
int
hashCode()
This method is unsupported because NDArrays should not be used as keys in hash-based collections.int[]
linearIndexToViewIndices(int linearIndex)
NDArray<T>
similar()
Returns a new array of the same shape as this NDArray filled with zeros.-
Methods inherited from class io.github.hakkelt.ndarrays.internal.AbstractNDArray
accumulate, apply, applyOnSlices, applyWithCartesianIndices, applyWithLinearIndices, contains, contentToString, contentToString, fillUsingCartesianIndices, fillUsingLinearIndices, forEach, forEachWithCartesianIndices, forEachWithLinearIndices, get, get, getImag, getImag, getReal, getReal, iterator, length, mapOnSlices, maybeParallelStream, ndim, norm, norm, parallelStream, prod, reduceSlices, set, set, setImag, setImag, setReal, setReal, shape, shape, spliterator, stream, streamCartesianIndices, streamLinearIndices, sum, toArray, toArray, toArray, toString, writeToFile
-
Methods inherited from interface io.github.hakkelt.ndarrays.NDArray
accumulate, 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, divide, divide, divide, divide, divide, divide, divide, divide, divideInplace, divideInplace, divideInplace, divideInplace, divideInplace, divideInplace, divideInplace, divideInplace, dropDims, 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, norm, permuteDims, prod, reshape, selectDims, set, set, slice, squeeze, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtractInplace, subtractInplace, subtractInplace, subtractInplace, subtractInplace, subtractInplace, subtractInplace, subtractInplace, sum
-
-
-
-
Method Detail
-
getNamePrefix
public String getNamePrefix()
Description copied from interface:NDArray
Returns a string that identifies the implementation behind this current object. The output of the toString() function starts with this string.- Returns:
- a string that identifies the implementation
-
dtype
public Class<?> dtype()
Description copied from interface:NDArray
Returns the type of values returned by get method. Possible values:Float.class
,Double.class
,Complex.class
Byte.class
,Short.class
,Integer.class
,Long.class
.- Returns:
- the type of values returned by get method.
-
dtype2
public Class<?> dtype2()
-
dataTypeAsString
public String dataTypeAsString()
Description copied from interface:NDArray
Returns a String representation of element type.- Returns:
- "Byte", "Short", "Integer", "Long", "Float", "Double", "Complex Float", or "Complex Double" depending on the type of array
-
getParent
public AbstractNDArray<T,T2> getParent()
-
getTopMostParent
public AbstractNDArray<T,T2> getTopMostParent()
-
similar
public NDArray<T> similar()
Description copied from interface:NDArray
Returns a new array of the same shape as this NDArray filled with zeros.
-
copy
public NDArray<T> copy()
Description copied from interface:NDArray
Returns a copy of this NDArray.
-
linearIndexToViewIndices
public int[] linearIndexToViewIndices(int linearIndex)
-
equals
public boolean equals(Object obj)
Description copied from interface:NDArray
Compares the specified object with this NDArray for equality. Two arrays are equal, if they are both real or both complex, and they are element-wise equal. If the specified object is not NDArray then the function returns false.
-
hashCode
public int hashCode()
Description copied from interface:NDArray
This method is unsupported because NDArrays should not be used as keys in hash-based collections.
-
-