Top Description Methods
org.apache.commons.math3.linear

public Interface RealVectorChangingVisitor


This interface defines a visitor for the entries of a vector. Visitors implementing this interface may alter the entries of the vector being visited.
Since
3.1

Method Summary

Modifier and TypeMethod and Description
public double
public void
start(int
the size of the vector
dimension
,
int
the index of the first entry to be visited
start
,
int
the index of the last entry to be visited (inclusive)
end
)

Start visiting a vector.

public double

Returns:

the new value of the entry being visited
visit
(int
the index of the entry being visited
index
,
double
the value of the entry being visited
value
)

Visit one entry of the vector.

Method Detail

endback to summary
public double end()

End visiting a vector. This method is called once, after all entries of the vector have been visited.

Returns:double

the value returned by RealVector#walkInDefaultOrder(RealVectorChangingVisitor), RealVector#walkInDefaultOrder(RealVectorChangingVisitor, int, int), RealVector#walkInOptimizedOrder(RealVectorChangingVisitor) or RealVector#walkInOptimizedOrder(RealVectorChangingVisitor, int, int)

startback to summary
public void start(int dimension, int start, int end)

Start visiting a vector. This method is called once, before any entry of the vector is visited.

Parameters
dimension:int

the size of the vector

start:int

the index of the first entry to be visited

end:int

the index of the last entry to be visited (inclusive)

visitback to summary
public double visit(int index, double value)

Visit one entry of the vector.

Parameters
index:int

the index of the entry being visited

value:double

the value of the entry being visited

Returns:double

the new value of the entry being visited