Example usage for org.apache.commons.math3.linear RealVectorChangingVisitor start

List of usage examples for org.apache.commons.math3.linear RealVectorChangingVisitor start

Introduction

In this page you can find the example usage for org.apache.commons.math3.linear RealVectorChangingVisitor start.

Prototype

void start(int dimension, int start, int end);

Source Link

Document

Start visiting a vector.

Usage

From source file:com.cloudera.oryx.common.math.SparseRealVector.java

private double doWalk(Iterator<Entry> it, RealVectorChangingVisitor visitor) {
    int dim = getDimension();
    visitor.start(dim, 0, dim - 1);
    while (it.hasNext()) {
        Entry e = it.next();//from   w  ww .j  a v a  2  s  .c o m
        e.setValue(visitor.visit(e.getIndex(), e.getValue()));
    }
    return visitor.end();
}