ru.sscc.util.data
Class FloatSVecVector
java.lang.Object
|
+--ru.sscc.util.data.RealVector
|
+--ru.sscc.util.data.FloatSVecVector
- public final class FloatSVecVector
- extends RealVector
The implementation of RealVector vector for access to a
component of vectors array based on float[]
type container and indexed by short[] reference vector
(the sign bit of reference entries is considered as the numeric bit).
- See Also:
- Serialized Form
|
Constructor Summary |
FloatSVecVector(float[] data,
short[] ref,
int length,
int component,
int dimension)
Constructor for ordinary case when index=0 and step=1. |
FloatSVecVector(float[] data,
short[] ref,
int length,
int component,
int dimension,
int index,
int step)
General constructor. |
|
Method Summary |
double |
add(int index,
double value)
Adds the value to the vector entry. |
double |
get(int index)
Gets the value of a vector entry. |
RealPointer |
getPointer()
Gets a pointer to the beginning of the real data vector
with the unit increment. |
double |
mul(int index,
double value)
Multiplies the vector entry by the value. |
double |
set(int index,
double value)
Sets the value of a vector entry. |
RealVector |
subvector(int index,
int step,
int length)
Creates a subvector within the real data vector. |
| Methods inherited from class ru.sscc.util.data.RealVector |
addVector,
addVector,
assign,
assign,
assign,
assign,
assign,
assign,
by,
by,
ensureLength,
getPointer,
inc,
indexOfNormMax,
indexOfNormMax,
innerProduct,
innerProduct,
multiply,
multiply,
norm,
norm,
normMax,
normMax,
normSum,
normSum,
pos,
swap,
weightedNorm,
weightedNorm,
weightedNormMax,
weightedNormMax,
weightedNormSum,
weightedNormSum,
weightedProduct,
weightedProduct |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
FloatSVecVector
public FloatSVecVector(float[] data,
short[] ref,
int length,
int component,
int dimension)
- Constructor for ordinary case when index=0 and step=1.
- Parameters:
data - a vectors containerref - a reference vectorlength - a length of constructed vectorcomponent - a component numberdimension - a vector dimension
FloatSVecVector
public FloatSVecVector(float[] data,
short[] ref,
int length,
int component,
int dimension,
int index,
int step)
- General constructor.
- Parameters:
data - a vectors containerref - a reference vectorlength - a length of constructed vectorcomponent - a component numberdimension - a vector dimensionindex - a starting index in the reference vectorstep - an increment step in the reference vector
get
public double get(int index)
- Gets the value of a vector entry.
- Overrides:
- get in class RealVector
- Parameters:
index - an entry position in the vector- Returns:
- an entry value at the required position
set
public double set(int index,
double value)
- Sets the value of a vector entry.
- Overrides:
- set in class RealVector
- Parameters:
index - an entry position in the vectorvalue - a value to set- Returns:
- the set value
add
public double add(int index,
double value)
- Adds the value to the vector entry.
- Overrides:
- add in class RealVector
- Parameters:
index - the entry position in the containervalue - the value to add- Returns:
- the result of addition
mul
public double mul(int index,
double value)
- Multiplies the vector entry by the value.
- Overrides:
- mul in class RealVector
- Parameters:
index - the entry position in the containervalue - the value to multiply- Returns:
- the result of multiplication
getPointer
public RealPointer getPointer()
- Gets a pointer to the beginning of the real data vector
with the unit increment.
- Overrides:
- getPointer in class RealVector
subvector
public RealVector subvector(int index,
int step,
int length)
- Creates a subvector within the real data vector.
- Overrides:
- subvector in class RealVector
- Parameters:
index - a starting indexstep - an increment steplength - a length of the subvector