List of usage examples for org.apache.commons.math3.linear SparseRealVector setEntry
public abstract void setEntry(int index, double value) throws OutOfRangeException;
From source file:edu.byu.nlp.dataset.BasicSparseFeatureVector.java
@Override public SparseRealVector asApacheSparseRealVector() { SparseRealVector retval = new OpenMapRealVector(length()); for (int i = 0; i < indices.length; i++) { retval.setEntry(indices[i], values[i]); }/*from w ww . jav a 2 s . c om*/ return retval; }