Example usage for org.apache.commons.math3.linear ArrayRealVector ArrayRealVector

List of usage examples for org.apache.commons.math3.linear ArrayRealVector ArrayRealVector

Introduction

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

Prototype

public ArrayRealVector(ArrayRealVector v) throws NullArgumentException 

Source Link

Document

Construct a vector from another vector, using a deep copy.

Usage

From source file:org.lenskit.util.math.RowView.java

@Override
public RealVector append(double d) {
    return new ArrayRealVector(this).append(d);
}

From source file:org.lenskit.util.math.RowView.java

@Override
public RealVector copy() {
    return new ArrayRealVector(this);
}

From source file:org.lenskit.util.math.RowView.java

@Override
public RealVector ebeDivide(RealVector v) throws DimensionMismatchException {
    return new ArrayRealVector(this).ebeDivide(v);
}

From source file:org.lenskit.util.math.RowView.java

@Override
public RealVector ebeMultiply(RealVector v) throws DimensionMismatchException {
    return new ArrayRealVector(this).ebeMultiply(v);
}

From source file:org.meresco.lucene.search.MerescoVector.java

public double[] getPoint() {
    if (this.point == null) {
        this.point = new ArrayRealVector(this.maxIndex + 1);
        Iterator iter = entries.iterator();
        while (iter.hasNext()) {
            iter.advance();//from  w  w  w. ja v  a  2  s  .  c  o m
            this.point.setEntry(iter.key(), iter.value());
        }
    }
    this.point.unitize();
    return this.point.getDataRef();
}