Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void test()
        public virtual void test()
        {
            double       chi2   = 13.234324;
            double       pen    = 2.3445;
            int          nParms = 12;
            DoubleArray  parms  = DoubleArray.filled(nParms, 0.5);
            DoubleMatrix cov    = DoubleMatrix.filled(nParms, nParms);

            LeastSquareWithPenaltyResults res = new LeastSquareWithPenaltyResults(chi2, pen, parms, cov);

            assertEquals(chi2, res.ChiSq);
            assertEquals(pen, res.Penalty);

            DoubleMatrix invJac = DoubleMatrix.filled(nParms, 5);

            res = new LeastSquareWithPenaltyResults(chi2, pen, parms, cov, invJac);
            assertEquals(chi2, res.ChiSq);
            assertEquals(pen, res.Penalty);
        }