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

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

Introduction

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

Prototype

@Override
public RealVector mapSubtractToSelf(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);
    xVector.mapDivideToSelf(max - min);//from   ww  w  . j  ava2s.co  m
    // translating [0,1]=>[0.1,0.9]
    xVector.mapMultiplyToSelf(SQUEEZE);
    xVector.mapAddToSelf(OFFSET);
    return xVector;
}