|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ru.sscc.util.data.RealPointer | +--ru.sscc.util.data.RealPointers
An implementation of RealPointer
based on RealVectors
type container. Every vector occupies a continuous part of the container.
The vectors array is logically presented by this pointer as a continuous
array consisting of vectors ordered by their natural order (inspite
their representation in the container). So, moving the pointer up, you
will access to the components of 0th vector, then 1st vector, then 2nd
vector and so on. You can also directly select a vector to point
using the
Fields inherited from class ru.sscc.util.data.RealPointer |
index,
step |
Constructor Summary | |
RealPointers(RealVectors vectors)
Constructor. |
Method Summary | |
double |
add(double value)
Adds a value to the entry at the current pointer position. |
java.lang.Object |
clone()
Clones the pointer. |
double |
get()
Gets an entry value at the current pointer position. |
RealVectors |
getVectors()
Returns vectors container pointed. |
double |
mul(double value)
Multiplies the entry at the current pointer position by a value. |
RealPointer |
reset(int index,
int step)
Resets the pointer's position and increment to new values respective to the vector structure choosen when the pointer was constructed. |
void |
restore(long value)
Restores the pointer's index and step using a value saved in save operation. |
long |
save()
Packs the current pointer's index and step into long variable and returns it. |
void |
select(int i)
Selects i-th vector and resets the pointer to the beginning of the selected vector. |
double |
set(double value)
Sets an entry value at the current pointer position. |
Methods inherited from class ru.sscc.util.data.RealPointer |
by,
invert,
next,
previous,
shift |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RealPointers(RealVectors vectors)
vectors
- a vectors containerMethod Detail |
public double get()
public double set(double value)
value
- a value to setpublic double add(double value)
value
- a value to addpublic double mul(double value)
value
- a value to multiplypublic RealVectors getVectors()
public void select(int i)
public long save()
public void restore(long value)
value
- a value to restorepublic RealPointer reset(int index, int step)
index
- the new pointer position in the vectorstep
- the new increment step in the vectorpublic java.lang.Object clone()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |