List of usage examples for org.apache.commons.math3.linear ArrayRealVector mapToSelf
@Override
public ArrayRealVector mapToSelf(UnivariateFunction function)
From source file:gamlss.utilities.WLSMultipleLinearRegression.java
/** * Loads model x and y sample data, overriding any previous sample. * <b>Cloning is not performed to speed the operation</b>. * Computes and caches QR decomposition of the X matrix. * @param y the [n,1] array representing the y sample * @param x the [n,k] array representing design matrix * @param w the [n,1] array representing the weights * @throws IllegalArgumentException if the x and y array data are not * compatible for the regression *///from ww w.ja va2s .com public void newSampleData(ArrayRealVector y, RealMatrix x, ArrayRealVector w) { w.mapToSelf(new Sqrt()); if (this.copyOriginal) { newSampleDataCopyOriginal(y, x, w); } else { newSampleDataNoCopy(y, x, w); } }