/// @return DhbEstimation.EstimatedPolynomial
 public EstimatedPolynomial Evaluate()
 {
     for (int i = 0; i < _systemConstants.Length; i++)
     {
         for (int j = i + 1; j < _systemConstants.Length; j++)
             _systemMatrix[i, j] = _systemMatrix[j, i];
     }
     try
     {
         LUPDecomposition lupSystem = new LUPDecomposition(_systemMatrix);
         double[,] components = lupSystem.InverseMatrixComponents();
         LUPDecomposition.SymmetrizeComponents(components);
         return new EstimatedPolynomial(
                         lupSystem.Solve(_systemConstants),
                         SymmetricMatrix.FromComponents(components) );
     }
     catch (DhbIllegalDimension) { }
     catch (DhbNonSymmetricComponents) { }
     return null;
 }
示例#2
0
 /// @return LUPDecomposition	the LUP decomposition of the receiver.
 /// @exception DhbIllegalDimension if the receiver is not
 ///													a square matrix.
 protected LUPDecomposition LupDecomposition()
 {
     if (_lupDecomposition == null)
         _lupDecomposition = new LUPDecomposition(this);
     return _lupDecomposition;
 }