Class VectorImpl
java.lang.Object
de.uni_trier.wi2.procake.similarity.nest.sequence.utils.impl.VectorImpl
- All Implemented Interfaces:
Vector
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd a vector to this vector.double
get
(int idx) Get the value of the vector at a specified position.int
getSize()
Get the size of the vector.double
max()
The maximum value of the vector.int
maxIdx()
Index at which the vector holds its maximum value.void
set
(int idx, double value) Set the value at a specified position.times
(double val) Multiplication to a scalar.
-
Constructor Details
-
VectorImpl
public VectorImpl(int size) -
VectorImpl
public VectorImpl(double... values)
-
-
Method Details
-
add
Description copied from interface:Vector
Add a vector to this vector. -
times
Description copied from interface:Vector
Multiplication to a scalar. -
maxIdx
public int maxIdx()Description copied from interface:Vector
Index at which the vector holds its maximum value. -
max
public double max()Description copied from interface:Vector
The maximum value of the vector. -
get
public double get(int idx) Description copied from interface:Vector
Get the value of the vector at a specified position. -
set
public void set(int idx, double value) Description copied from interface:Vector
Set the value at a specified position. -
getSize
public int getSize()Description copied from interface:Vector
Get the size of the vector.
-