public class WrappedScalarVector extends AWrappedVector<AScalar>
| Modifier and Type | Field and Description |
|---|---|
AScalar |
scalar |
length| Constructor and Description |
|---|
WrappedScalarVector(AScalar s) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAt(int i,
double v)
Adds a value to a specific element of the vector
This function does not perform bounds checking, i.e.
|
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
int |
componentCount()
Returns the number of components of this array.
|
double |
dotProduct(double[] data,
int offset)
Fast dot product with a double[] array.
|
double |
dotProduct(double[] data,
int offset,
int stride)
Fast dot product with a double[] array and a stride.
|
double |
elementMax()
Returns the maximum element value in this array.
|
double |
elementMin()
Returns the maximum element value in this array.
|
double |
elementSquaredSum()
Returns the sum of squared elements in this array.
|
double |
elementSum()
Returns the sum of all elements in a vector
|
boolean |
equalsArray(double[] data,
int offset)
Returns true if this vector exactly matches the elements in double[] array, starting
from the specified offset
|
WrappedScalarVector |
exactClone()
Returns an exact clone of this vector, i.e.
|
double |
get(int i)
Returns the double value at the specified position in a 1D vector
|
AScalar |
getComponent(int k)
Gets a component from the array at the specified index
Will throw an error if components are not supported, or if the component is out of bounds as defined by 0 <= k |
boolean |
isBoolean()
Returns true if the array is boolean (contains only 0.0 or 1.0 values)
|
boolean |
isFullyMutable()
Returns true if this vector is fully mutable, i.e.
|
boolean |
isMutable()
Returns true if this vector is mutable.
|
boolean |
isZero()
Returns true if this vector is a zero vector (all components zero)
|
void |
multiply(double factor)
Multiplies the vector by a constant factor
|
void |
set(int i,
double value)
Sets a value at a given position in a mutable 1D array
|
double |
unsafeGet(int i) |
checkIndex, checkLength, checkRange, checkSameLength, checkSameLength, elementCount, equalsArray, get, getShape, getShapeClone, isSameShape, length, sliceCountabs, absCopy, add, add, add, add, add, add, add, add, add, addAt, addCopy, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultiple, addMultipleCopy, addMultipleToArray, addMultipleToArray, addPower, addPower, addPower, addProduct, addProduct, addProduct, addProductCopy, addProductCopy, addProductToArray, addProductToArray, addToArray, addToArray, addToArray, addWeighted, angle, applyOp, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, asVector, broadcast, broadcastLike, broadcastLike, broadcastLike, checkDimension, checkSameLength, clamp, clampMax, clampMin, clone, compareTo, copy, copyTo, copyTo, copyTo, copyTo, copyTo, crossProduct, crossProduct, dense, denseClone, dimensionality, distance, distanceL1, distanceLinf, distanceSquared, divide, divide, divide, divide, divideCopy, divideCopy, divideTo, dotProduct, dotProduct, dotProduct, elementAbsPowSum, elementIterator, elementPowSum, elementProduct, elementsEqual, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, fill, fillRange, get, get, get, get, getElements, getElements, getElements, getLongShape, getShape, getSlices, getTranspose, getTransposeCopy, getTransposeView, hashCode, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, interpolate, isElementConstrained, isRangeZero, isSameShape, isUnitLengthVector, isUnitLengthVector, isView, iterator, join, join, join, log, logistic, magnitude, magnitudeSquared, maxAbsElement, maxAbsElementIndex, maxElement, maxElementIndex, minElement, minElementIndex, multiply, multiply, multiply, multiply, multiplyCopy, multiplyCopy, multiplyCopy, multiplyTo, mutable, negate, negateCopy, nonSparseIndex, nonZeroCount, nonZeroIndices, nonZeroValues, normalise, normaliseCopy, normaliseMaxAbsElement, outerProduct, outerProduct, pow, projectToPlane, reduce, reduce, reduceSlices, reduceSlices, reorder, reorder, reshape, rotateCopy, rotateView, rotateView, scale, scaleAdd, scaleAdd, scaleAdd, scaleAdd, scaleCopy, scaleToMagnitude, select, selectClone, selectView, set, set, set, set, set, set, set, set, set, set, setElements, setElements, setElements, setInnerProduct, setInnerProduct, setInnerProduct, setMultiple, setMultiple, setMultiple, setMultiple, shiftCopy, signum, slice, slice, sliceValue, softmax, softmaxCopy, sparse, sparseClone, sqrtCopy, square, squareCopy, sub, sub, subArray, subAt, subCopy, subCopy, subMultiple, subVector, tanh, toDoubleArray, toDoubleBuffer, toList, toNormal, toSliceArray, toString, toStringFull, toVector, tryEfficientJoin, unsafeSet, validateadd, addInnerProduct, addInnerProduct, addOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, density, ensureMutable, exp, get, get, get, getComponents, getElements, getElements, getSlices, getSliceViews, isDense, isSparse, reciprocal, reciprocalCopy, scale, set, set, signumCopy, sqrt, sub, sub, toArray, withComponentsfinalize, getClass, notify, notifyAll, wait, wait, waitaddOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, ensureMutable, exp, get, get, get, getComponents, getElements, getElements, getSlices, getSliceViews, isDense, isSparse, reciprocal, reciprocalCopy, scale, set, set, signumCopy, sqrt, sub, toArray, withComponentsforEach, spliteratorpublic final AScalar scalar
public WrappedScalarVector(AScalar s)
public boolean isMutable()
AVectorpublic boolean isFullyMutable()
AVectorisFullyMutable in interface INDArrayisFullyMutable in class AVectorpublic int componentCount()
INDArraycomponentCount in interface INDArraycomponentCount in class AbstractArray<Double>public AScalar getComponent(int k)
INDArraygetComponent in interface INDArraygetComponent in class AbstractArray<Double>public void multiply(double factor)
AVectorpublic double get(int i)
INDArraypublic boolean isBoolean()
INDArrayisBoolean in interface INDArrayisBoolean in class AbstractArray<Double>public boolean isZero()
AVectorpublic void set(int i,
double value)
INDArraypublic void applyOp(Op op)
INDArraypublic double elementSum()
AVectorelementSum in interface INDArrayelementSum in class AVectorpublic double elementSquaredSum()
INDArrayelementSquaredSum in interface INDArrayelementSquaredSum in class AVectorpublic double elementMax()
INDArrayelementMax in interface INDArrayelementMax in class AVectorpublic double elementMin()
INDArrayelementMin in interface INDArrayelementMin in class AVectorpublic double dotProduct(double[] data,
int offset)
AVectordotProduct in class AVectorpublic WrappedScalarVector exactClone()
AVectorexactClone in interface INDArrayexactClone in class AVectorpublic void addAt(int i,
double v)
AVectorpublic double dotProduct(double[] data,
int offset,
int stride)
AVectordotProduct in class AVectorpublic boolean equalsArray(double[] data,
int offset)
AVectorequalsArray in interface INDArrayequalsArray in class ASizedVectordata - Array of double element values to check for equalityoffset - Offset into the data arrayCopyright © 2016. All rights reserved.