public final class Scalar extends AScalar
| Modifier and Type | Field and Description |
|---|---|
double |
value |
| Constructor and Description |
|---|
Scalar(double value) |
| Modifier and Type | Method and Description |
|---|---|
void |
abs()
Replaces all elements of this array with their absolute values, according to Math.abs(double)
|
void |
add(double d)
Adds a double value to all elements in this array.
|
static Scalar |
create(AScalar a) |
static Scalar |
create(double value) |
static INDArray |
create(Number number) |
static Scalar |
createFromVector(AVector data)
Creates a new Scalar using the elements in the specified vector.
|
Scalar |
exactClone()
Creates a deep clone of an array, using the same class implementation as the original array
|
double |
get()
Returns the double value of a scalar array
|
void |
getElements(double[] dest,
int offset)
Gets all elements of the array, copying them into a double array at the specified offset
|
ImmutableScalar |
immutable()
Returns an immutable version of this array.
|
boolean |
isView()
Return true if this array is considered as a view type.
|
boolean |
isZero()
Returns true if the array is zero (all elements equal to zero)
|
void |
multiply(double factor)
Multiplies all elements of the array in place by a given double value
|
Scalar |
mutable()
Coerces this INDArray to a fully mutable format.
|
void |
negate()
Negates all elements in the array in place
|
void |
scaleAdd(double factor,
double constant)
Scales all elements of the array by a given double value and adds a constant value
|
void |
set(double value)
Sets all elements of an array to a specific double value
|
void |
sub(double d)
Subtracts a double value from all elements in this array
|
add, addAt, addCopy, addInnerProduct, addToArray, applyOp, applyOp, applyOp, applyOp, asDoubleArray, asVector, broadcast, broadcastLike, broadcastLike, broadcastLike, checkDimension, clamp, clone, dense, denseClone, dimensionality, divide, elementCount, elementIterator, elementMax, elementMin, elementProduct, elementsEqual, elementSquaredSum, elementSum, epsilonEquals, epsilonEquals, equals, equals, equals, equalsArray, get, get, get, getElements, getLongShape, getShape, getShape, getSlices, getTranspose, getTransposeView, hashCode, hasUncountable, innerProduct, innerProduct, innerProduct, innerProduct, isBoolean, isElementConstrained, isFullyMutable, isMutable, iterator, multiply, nonZeroCount, outerProduct, pow, reduce, reduce, reshape, set, setElements, setElements, slice, slice, sliceCount, sparse, sparseClone, square, sub, subArray, toDoubleArray, toDoubleBuffer, toSliceArray, toString, validateabsCopy, add, addCopy, addInnerProduct, addInnerProduct, addMultiple, addOuterProduct, addPower, addPower, applyOpCopy, asElementList, broadcastCloneLike, broadcastCopyLike, checkMutable, componentCount, copy, density, divide, divideCopy, elementAbsPowSum, elementPowSum, ensureMutable, equals, equalsArray, exp, fill, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getShapeClone, getSlices, getSliceViews, getTransposeCopy, isDense, isSameShape, isSparse, join, join, log, multiplyCopy, multiplyCopy, negateCopy, reciprocal, reciprocalCopy, reduceSlices, reduceSlices, reorder, reorder, rotateView, scale, scaleAdd, scaleCopy, set, set, set, set, set, setElements, setInnerProduct, setMultiple, setMultiple, signum, signumCopy, sliceValue, sqrt, squareCopy, sub, subCopy, toArray, toStringFull, toVector, withComponentsfinalize, getClass, notify, notifyAll, wait, wait, waitabsCopy, addCopy, addMultiple, addOuterProduct, addPower, addPower, applyOpCopy, asElementList, broadcastCloneLike, broadcastCopyLike, checkMutable, componentCount, copy, divide, divideCopy, elementAbsPowSum, elementPowSum, ensureMutable, equalsArray, exp, fill, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getShapeClone, getSlices, getSliceViews, getTransposeCopy, isDense, isSameShape, isSparse, join, join, log, multiplyCopy, multiplyCopy, negateCopy, reciprocal, reciprocalCopy, reduceSlices, reduceSlices, reorder, reorder, rotateView, scale, scaleAdd, scaleCopy, set, set, set, set, set, setElements, setInnerProduct, setMultiple, setMultiple, signum, signumCopy, sliceValue, sqrt, squareCopy, subCopy, toArray, toVector, withComponentsforEach, spliteratorpublic static Scalar create(double value)
public double get()
INDArraypublic void set(double value)
INDArraypublic void abs()
INDArraypublic void add(double d)
INDArraypublic void sub(double d)
INDArraypublic void multiply(double factor)
INDArraypublic void negate()
INDArraypublic void scaleAdd(double factor,
double constant)
INDArrayscaleAdd in interface INDArrayscaleAdd in class AbstractArray<Object>public boolean isView()
INDArraypublic boolean isZero()
INDArraypublic void getElements(double[] dest,
int offset)
INDArraygetElements in interface INDArraygetElements in class AScalarpublic Scalar exactClone()
INDArrayexactClone in interface INDArrayexactClone in class AScalarpublic static Scalar createFromVector(AVector data)
data - rows - columns - public Scalar mutable()
INDArraypublic ImmutableScalar immutable()
INDArrayCopyright © 2016. All rights reserved.