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

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

Introduction

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

Prototype

@Override
public RealVector mapAddToSelf(double d) 

Source Link

Usage

From source file:edu.utexas.cs.tactex.subscriptionspredictors.LWRCustOldAppache.java

private ArrayRealVector createNormalizedXVector(Set<Double> xValues, double min, double max) {
    Double[] dummy1 = new Double[1]; // needed to determine the type of toArray?     
    ArrayRealVector xVector = new ArrayRealVector(xValues.toArray(dummy1));
    xVector.mapSubtractToSelf(min);/*from   ww w. ja va 2 s  . c o  m*/
    xVector.mapDivideToSelf(max - min);
    // translating [0,1]=>[0.1,0.9]
    xVector.mapMultiplyToSelf(SQUEEZE);
    xVector.mapAddToSelf(OFFSET);
    return xVector;
}