ru.sscc.util.data
Class FloatSVecPointer

java.lang.Object
  |
  +--ru.sscc.util.data.RealPointer
        |
        +--ru.sscc.util.data.FloatSVecPointer

public final class FloatSVecPointer
extends RealPointer

An implementation of RealPointer for access to a component of vectors array based on float[] type container indexed by short[] reference vector (the sign bit of reference entries is considered as the numeric bit).


Fields inherited from class ru.sscc.util.data.RealPointer
index, step
 
Constructor Summary
FloatSVecPointer(float[] data, short[] ref, int component, int dimension, int index, int step)
          Constructor.
 
Method Summary
 double add(double value)
          Adds a value to the entry at the current pointer position.
 double get()
          Gets an entry value at the current pointer position.
 double mul(double value)
          Multiplies the entry at the current pointer position by a value.
 double set(double value)
          Sets an entry value at the current pointer position.
 
Methods inherited from class ru.sscc.util.data.RealPointer
by, clone, invert, next, previous, reset, restore, save, shift
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatSVecPointer

public FloatSVecPointer(float[] data,
                        short[] ref,
                        int component,
                        int dimension,
                        int index,
                        int step)
Constructor.
Parameters:
data - a data container for vectors
ref - a reference vector
component - a number of vector's component
dimension - a vector dimension
index - a starting index in the reference vector
step - an increment step in the reference vector
Method Detail

get

public double get()
Gets an entry value at the current pointer position.
Overrides:
get in class RealPointer
Returns:
value of the current entry

set

public double set(double value)
Sets an entry value at the current pointer position.
Overrides:
set in class RealPointer
Parameters:
value - a value to set
Returns:
the set value

add

public double add(double value)
Adds a value to the entry at the current pointer position.
Overrides:
add in class RealPointer
Parameters:
value - a value to add
Returns:
the result of addition

mul

public double mul(double value)
Multiplies the entry at the current pointer position by a value.
Overrides:
mul in class RealPointer
Parameters:
value - a value to multiply
Returns:
the result of multiplication