Ejemplo n.º 1
0
        public virtual LUDecompositionResult apply(DoubleMatrix x)
        {
            ArgChecker.notNull(x, "x");
            RealMatrix      temp = CommonsMathWrapper.wrap(x);
            LUDecomposition lu   = new LUDecomposition(temp);

            return(new LUDecompositionCommonsResult(lu));
        }
 /// <summary>
 /// Creates an instance.
 /// </summary>
 /// <param name="lu"> The result of the LU decomposition, not null. $\mathbf{L}$ cannot be singular. </param>
 public LUDecompositionCommonsResult(LUDecomposition lu)
 {
     ArgChecker.notNull(lu, "LU decomposition");
     ArgChecker.notNull(lu.L, "Matrix is singular; could not perform LU decomposition");
     _determinant = lu.Determinant;
     _l           = CommonsMathWrapper.unwrap(lu.L);
     _p           = CommonsMathWrapper.unwrap(lu.P);
     _pivot       = lu.Pivot;
     _solver      = lu.Solver;
     _u           = CommonsMathWrapper.unwrap(lu.U);
 }
 private void InitializeInstanceFields()
 {
     decomp = new LUDecomposition(condok);
     result = new LUDecompositionCommonsResult(decomp);
 }