Example usage for org.apache.mahout.math VectorView VectorView

List of usage examples for org.apache.mahout.math VectorView VectorView

Introduction

In this page you can find the example usage for org.apache.mahout.math VectorView VectorView.

Prototype

public VectorView(Vector vector, int offset, int cardinality) 

Source Link

Usage

From source file:org.qcri.pca.MahoutCompatibilityTest.java

License:Apache License

@Test
public void testMAHOUT_1238() throws IOException {
    Vector v = new SequentialAccessSparseVector(5);
    v.set(1, 3.0);//from   w  ww  .j a  v  a2  s .c  o  m
    v.set(3, 5.0);
    Vector view = new VectorView(v, 0, v.size());
    doTestVectorWritableEquals(view);
}