| 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(AScalar s) |
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 Scalar |
createFromVector(AVector data)
Creates a new Scalar using the elements in the specified vector.
|
Scalar |
exactClone()
Returns an exact deep clone of an array (i.e.
|
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
|
boolean |
isView()
Return true if this array is 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 by a given double value
|
void |
negate()
Negates all elements in the array
|
void |
scaleAdd(double factor,
double constant)
Scales all elements of the array by a given double value and adds a constant vale
|
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, applyOp, applyOp, asDoubleArray, asVector, broadcast, clamp, clone, copyTo, dimensionality, divide, elementCount, elementIterator, elementSquaredSum, elementSum, epsilonEquals, epsilonEquals, equals, equals, equals, get, getLongShape, getShape, getShape, getSlices, getTranspose, getTransposeView, hashCode, innerProduct, innerProduct, isElementConstrained, isFullyMutable, isMutable, iterator, multiply, nonZeroCount, outerProduct, pow, reshape, set, setElements, slice, slice, sliceCount, square, sub, sub, toDoubleArray, toDoubleBuffer, toString, validateasElementList, broadcastCloneLike, broadcastLike, divide, ensureMutable, exp, fill, get, get, getSliceViews, getTransposeCopy, isBoolean, isSameShape, log, reciprocal, scale, set, set, set, set, setElements, signum, sqrt, toArray, toVectorfinalize, getClass, notify, notifyAll, wait, wait, waitasElementList, broadcastCloneLike, broadcastLike, divide, ensureMutable, exp, fill, get, get, getSliceViews, getTransposeCopy, isBoolean, isSameShape, log, reciprocal, scale, set, set, set, set, setElements, signum, sqrt, toArray, toVectorpublic 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 AScalarCopyright © 2013. All Rights Reserved.