Package io.github.hakkelt.ndarrays
Class AbstractByteNDArray
- java.lang.Object
-
- io.github.hakkelt.ndarrays.internal.AbstractNDArray<T,T>
-
- io.github.hakkelt.ndarrays.internal.AbstractRealNDArray<Byte>
-
- io.github.hakkelt.ndarrays.AbstractByteNDArray
-
- Direct Known Subclasses:
BasicByteNDArray
public abstract class AbstractByteNDArray extends AbstractRealNDArray<Byte>
Abstract NDArray class for byte (8-bit integer) values.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>
dtype()
Returns the type of values returned by get method.void
set(Number value, int linearIndex)
Sets the value of an element specified by linear indexing.void
set(Number value, int... indices)
Sets the value of an element specified by cartesian indexing.-
Methods inherited from class io.github.hakkelt.ndarrays.internal.AbstractRealNDArray
copyFrom, dataTypeAsString
-
Methods inherited from class io.github.hakkelt.ndarrays.internal.AbstractNDArray
accumulate, apply, applyOnSlices, applyWithCartesianIndices, applyWithLinearIndices, contains, contentToString, contentToString, copy, equals, fillUsingCartesianIndices, fillUsingLinearIndices, forEach, forEachWithCartesianIndices, forEachWithLinearIndices, get, get, getImag, getImag, getReal, getReal, hashCode, iterator, length, mapOnSlices, maybeParallelStream, ndim, norm, norm, parallelStream, prod, reduceSlices, set, set, setImag, setImag, setReal, setReal, shape, shape, similar, 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, addInplace, addInplace, addInplace, addInplace, addInplace, addInplace, addInplace, apply, applyOnSlices, applyWithCartesianIndices, applyWithLinearIndices, contains, contentToString, contentToString, copy, divide, divide, divide, divide, divide, divide, divide, divideInplace, divideInplace, divideInplace, divideInplace, divideInplace, divideInplace, divideInplace, equals, fillUsingCartesianIndices, fillUsingLinearIndices, forEach, forEachWithCartesianIndices, forEachWithLinearIndices, get, get, getNamePrefix, hashCode, iterator, length, mapOnSlices, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiplyInplace, multiplyInplace, multiplyInplace, multiplyInplace, multiplyInplace, multiplyInplace, multiplyInplace, ndim, norm, norm, norm, parallelStream, prod, reduceSlices, set, set, shape, shape, similar, spliterator, stream, streamCartesianIndices, streamLinearIndices, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtractInplace, subtractInplace, subtractInplace, subtractInplace, subtractInplace, subtractInplace, subtractInplace, sum, toArray, toArray, toArray, toString, writeToFile
-
Methods inherited from interface io.github.hakkelt.ndarrays.internal.RealNDArray
accumulate, add, addInplace, concatenate, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, divide, divideInplace, dropDims, fill, fill, inverseMask, map, mapWithCartesianIndices, mapWithLinearIndices, mask, mask, maskWithCartesianIndices, maskWithLinearIndices, multiply, multiplyInplace, permuteDims, prod, reshape, selectDims, slice, squeeze, subtract, subtractInplace, sum
-
-
-
-
Method Detail
-
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.
-
set
public void set(Number value, int linearIndex)
Description copied from interface:NDArray
Sets the value of an element specified by linear indexing.Linear indexing: It selects the ith element using the column-major iteration order that linearly spans the entire array. in its particular dimension.
Negative indexing is supported, e.g. -1 refers to the last element, -2 refers to the item before the last one, etc.
- Parameters:
value
- value to be assignedlinearIndex
- linear coordinates
-
set
public void set(Number value, int... indices)
Description copied from interface:NDArray
Sets the value of an element specified by cartesian indexing.Cartesian indexing: The ordinary way to index into an N-dimensional array is to use exactly N indices; each index selects the position(s) in its particular dimension.
Negative indexing is supported, e.g. assuming a 3×4 NDArray, index [2,-1] equals to [2,3], and [-1,-3] is an equivalent of [2,1].
- Parameters:
value
- value to be assignedindices
- cartesian coordinates
-
-