public final class BitVector extends ABooleanVector
| Modifier and Type | Field and Description |
|---|---|
static double |
BIT_OFF |
static double |
BIT_ON |
static double |
BIT_THRESHOLD |
length| Constructor and Description |
|---|
BitVector(int length) |
| Modifier and Type | Method and Description |
|---|---|
static BitVector |
create(AVector source) |
static BitVector |
createLength(int length) |
double |
dotProduct(AVector v)
Returns the dot product of this vector with another vector
The vectors must have the same length: if not the result is undefined
|
double |
dotProduct(double[] data,
int offset)
Fast dot product with a double[] array.
|
double |
elementMax()
Returns the maximum element value in this array.
|
double |
elementSum()
Returns the sum of all elements in a vector
|
BitVector |
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
|
void |
getElements(double[] data,
int offset)
Gets all elements of the array, copying them into a double array at the specified offset
|
boolean |
isFullyMutable()
Returns true if this vector is fully mutable, i.e.
|
boolean |
isMutable()
Returns true if this vector is mutable.
|
boolean |
isView()
Returns true if this vector is of a view type that references other vectors / data.
|
boolean |
isZero()
Returns true if this vector is a zero vector (all components zero)
|
Vector |
multiplyCopy(AVector v)
Multiplies a vector element-wise with this vector, returning a new vector.
|
void |
multiplyTo(double[] data,
int offset)
Multiplies the elements in the target array by corresponding elements in this vector
|
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
static BitVector |
of(double... values) |
void |
set(int i,
double value)
Sets a value at a given position in a mutable 1D array
|
String |
toString() |
double |
unsafeGet(int i) |
elementAbsPowSum, elementPowSum, elementSquaredSum, hasUncountable, isBoolean, isElementConstrainedcheckIndex, checkLength, checkRange, checkSameLength, checkSameLength, elementCount, equalsArray, equalsArray, get, getShape, getShapeClone, isSameShape, length, sliceCountabs, absCopy, add, add, add, add, add, add, add, add, add, addAt, 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, 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, elementIterator, elementMin, elementProduct, elementsEqual, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, fill, fillRange, get, get, get, get, getElements, getElements, getLongShape, getShape, getSlices, getTranspose, getTransposeCopy, getTransposeView, hashCode, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, interpolate, isRangeZero, isSameShape, isUnitLengthVector, isUnitLengthVector, iterator, join, join, join, log, logistic, magnitude, magnitudeSquared, maxAbsElement, maxAbsElementIndex, maxElement, maxElementIndex, minElement, minElementIndex, multiply, multiply, multiply, multiply, multiply, multiplyCopy, multiplyCopy, mutable, negate, negateCopy, nonSparseIndex, 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, toStringFull, toVector, tryEfficientJoin, unsafeSet, validateadd, addInnerProduct, addInnerProduct, addOuterProduct, broadcastCloneLike, broadcastCopyLike, checkMutable, componentCount, density, ensureMutable, exp, get, get, get, getComponent, 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, componentCount, ensureMutable, exp, get, get, get, getComponent, getComponents, getElements, getElements, getSlices, getSliceViews, isDense, isSparse, reciprocal, reciprocalCopy, scale, set, set, signumCopy, sqrt, sub, toArray, withComponentsforEach, spliteratorpublic static final double BIT_ON
public static final double BIT_OFF
public static final double BIT_THRESHOLD
public static BitVector createLength(int length)
public double get(int i)
INDArraypublic boolean isFullyMutable()
AVectorisFullyMutable in interface INDArrayisFullyMutable in class ABooleanVectorpublic boolean isView()
AVectorpublic boolean isZero()
AVectorpublic double elementSum()
AVectorelementSum in interface INDArrayelementSum in class AVectorpublic double elementMax()
INDArrayelementMax in interface INDArrayelementMax in class AVectorpublic long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AVectorpublic boolean isMutable()
AVectorpublic double dotProduct(double[] data,
int offset)
AVectordotProduct in class AVectorpublic double dotProduct(AVector v)
AVectordotProduct in class AVectorpublic void multiplyTo(double[] data,
int offset)
AVectormultiplyTo in class AVectoroffset - The offset into the target arraypublic Vector multiplyCopy(AVector v)
IVectormultiplyCopy in interface IVectormultiplyCopy in class AVectorpublic void getElements(double[] data,
int offset)
INDArraygetElements in interface INDArraygetElements in class AVectorpublic void set(int i,
double value)
INDArraypublic static BitVector of(double... values)
public BitVector exactClone()
AVectorexactClone in interface INDArrayexactClone in class AVectorCopyright © 2016. All rights reserved.