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

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

Introduction

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

Prototype

RealLinearOperator

Source Link

Usage

From source file:edu.duke.cs.osprey.tupexp.IterativeCGTupleFitter.java

public IterativeCGTupleFitter(TupleIndexMatrix tim, ArrayList<int[]> samp, int numTuples,
        ArrayList<double[]> goodRegionBounds) {
    //We'll fit the specified (sample,trueVal) pairs to an expansion in the tuples in tim

    samples = samp;//from   ww w.  jav a 2s  . co  m
    numSamp = samples.size();
    numTup = numTuples;
    tupIndMat = tim;

    this.goodRegionBounds = goodRegionBounds;

    AtA = new RealLinearOperator() {

        @Override
        public int getRowDimension() {
            return numTup;
        }

        @Override
        public int getColumnDimension() {
            return numTup;
        }

        @Override
        public RealVector operate(RealVector rv) throws DimensionMismatchException {
            return applyAtA(rv);
        }
    };
}