mikera.vectorz.impl
Class MatrixIndexScalar
- java.lang.Object
-
- mikera.arrayz.impl.AbstractArray<java.lang.Object>
-
- mikera.vectorz.AScalar
-
- mikera.vectorz.impl.MatrixIndexScalar
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<INDArray>, java.lang.Iterable<java.lang.Object>, IDense, INDArray, IScalar
public class MatrixIndexScalar extends AScalar
Class representing a scalar view over a single element indexed from an underlying matrix- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description Scalarclone()Returns a clone of the array data, as a new array which will be fully mutable and may be of a different class to the original.MatrixIndexScalarexactClone()Creates a deep clone of an array, using the same class implementation as the original arraydoubleget()Returns the double value of a scalar arrayImmutableScalarimmutable()Returns an immutable version of this array.booleanisFullyMutable()If this method returns true, the INDArray is guaranteed to be fully mutable in all positions i.e.booleanisMutable()Returns true if the INDArray is mutable (at least partially)booleanisView()Return true if this array is considered as a view type.AScalarmutable()Coerces this INDArray to a fully mutable format.voidset(double value)Sets all elements of an array to a specific double valuevoidvalidate()Validates the internal data structure of the INDArray.static MatrixIndexScalarwrap(AMatrix matrix, int row, int col)-
Methods inherited from class mikera.vectorz.AScalar
abs, add, add, addAt, addCopy, addCopy, addInnerProduct, addInnerProduct, addMultiple, addPower, addToArray, applyOp, applyOp, applyOp, applyOp, asDoubleArray, asVector, broadcast, broadcastLike, broadcastLike, broadcastLike, clamp, compareTo, dense, denseClone, dimensionality, divide, elementCount, elementIterator, elementMax, elementMaxAbs, elementMin, elementProduct, elementsEqual, elementSquaredSum, elementSum, epsilonEquals, equals, equals, equals, equalsArray, get, get, get, getElement, getElements, getElements, getLongShape, getShape, getShape, getSlices, getTranspose, getTransposeView, hashCode, hasUncountable, innerProduct, innerProduct, innerProduct, innerProduct, isBoolean, isElementConstrained, isZero, iterator, multiply, multiply, multiplyCopy, negate, nonZeroCount, outerProduct, pow, reduce, reduce, reshape, set, setApplyOp, setElements, setElements, setElements, setSparse, slice, slice, sliceCount, sparse, sparseClone, square, sub, sub, subArray, toDoubleArray, toDoubleBuffer, toSliceArray, toString
-
Methods inherited from class mikera.arrayz.impl.AbstractArray
absCopy, absDiff, absDiffCopy, add, addApplyOp, addCopy, addInnerProduct, addInnerProduct, addMultipleSparse, addOuterProduct, addOuterProductSparse, addPower, addSparse, addSparse, applyOpCopy, asElementList, broadcastCloneLike, broadcastCopyLike, componentCount, copy, density, divide, divideCopy, divideCopy, elementAbsPowSum, elementPowSum, ensureMutable, epsilonEquals, equals, equalsArray, exp, fill, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getShapeClone, getSlices, getSliceViews, getTransposeCopy, isDense, isSameShape, isSparse, join, join, log, multiplyCopy, negateCopy, reciprocal, reciprocalCopy, reduceSlices, reduceSlices, reorder, reorder, rotateView, scale, scaleAdd, scaleAdd, scaleCopy, set, set, set, set, set, setInnerProduct, setMultiple, setMultiple, setSparse, signum, signumCopy, sliceValue, sqrt, squareCopy, sub, subCopy, toStringFull, toVector, withComponents
-
Methods inherited from interface mikera.arrayz.INDArray
absCopy, absDiff, absDiffCopy, addApplyOp, addMultipleSparse, addOuterProduct, addOuterProductSparse, addPower, addSparse, addSparse, applyOpCopy, asElementList, broadcastCloneLike, broadcastCopyLike, componentCount, copy, divide, divideCopy, divideCopy, elementAbsPowSum, elementPowSum, ensureMutable, epsilonEquals, equalsArray, exp, fill, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getShapeClone, getSlices, getSliceViews, getTransposeCopy, isDense, isSameShape, isSparse, join, join, log, multiplyCopy, negateCopy, reciprocal, reciprocalCopy, reduceSlices, reduceSlices, reorder, reorder, rotateView, scale, scaleAdd, scaleAdd, scaleCopy, set, set, set, set, set, setInnerProduct, setMultiple, setMultiple, setSparse, signum, signumCopy, sliceValue, sqrt, squareCopy, subCopy, toVector, withComponents
-
-
-
-
Method Detail
-
wrap
public static MatrixIndexScalar wrap(AMatrix matrix, int row, int col)
-
get
public double get()
Description copied from interface:INDArrayReturns the double value of a scalar array
-
set
public void set(double value)
Description copied from interface:INDArraySets all elements of an array to a specific double value
-
isMutable
public boolean isMutable()
Description copied from interface:INDArrayReturns true if the INDArray is mutable (at least partially)
-
isFullyMutable
public boolean isFullyMutable()
Description copied from interface:INDArrayIf this method returns true, the INDArray is guaranteed to be fully mutable in all positions i.e. every position can store any valid double value- Specified by:
isFullyMutablein interfaceINDArray- Overrides:
isFullyMutablein classAScalar
-
isView
public boolean isView()
Description copied from interface:INDArrayReturn true if this array is considered as a view type. This indicates (but does not guarantee): a) Data is *likely* to be shared with other arrays, so mutation of one may affect others b) It is *unlikely* to be in the most efficient general purpose format isView is intended to be used as for heuristics. It should *not* be used where the outcome might affect correctness.
-
clone
public Scalar clone()
Description copied from interface:INDArrayReturns a clone of the array data, as a new array which will be fully mutable and may be of a different class to the original. Clone should attempt to return the most efficient possible array type. Clone should preserve sparsity property where possible, but this is not guaranteed.
-
exactClone
public MatrixIndexScalar exactClone()
Description copied from interface:INDArrayCreates a deep clone of an array, using the same class implementation as the original array- Specified by:
exactClonein interfaceINDArray- Specified by:
exactClonein classAScalar- Returns:
- A clone of the original array
-
mutable
public AScalar mutable()
Description copied from interface:INDArrayCoerces this INDArray to a fully mutable format. May return the same INDArray if already fully mutable
-
immutable
public ImmutableScalar immutable()
Description copied from interface:INDArrayReturns an immutable version of this array. May return the same array if already immutable. Guarantees a defensive copy if the array is mutable.
-
validate
public void validate()
Description copied from interface:INDArrayValidates the internal data structure of the INDArray. Throws an exception on failure. Failure indicates a serious bug and/or data corruption.
-
-
DMelt 3.0 © DataMelt by jWork.ORG