public virtual void testSolveForVector()
        {
            double[] expectedRaw = new double[] { 0.0090821107573878, -0.0038563963265099, -0.0016307897061976, 0.1428043882617839 };
            assertTrue(FuzzyEquals.ArrayFuzzyEquals(result.solve(rawRHSvect), expectedRaw));

            assertTrue(FuzzyEquals.ArrayFuzzyEquals(result.solve(DoubleArray.copyOf(rawRHSvect)).toArray(), expectedRaw));
        }
 public virtual void testGetU()
 {
     double[][] expectedRaw = new double[][]
     {
         new double[] { 100.0000000000000000, 9.0000000000000000, 10.0000000000000000, 1.0000000000000000 },
         new double[] { 0.0000000000000000, 49.1899999999999977, 18.1000000000000014, 14.9100000000000001 },
         new double[] { 0.0000000000000000, 0.0000000000000000, 24.2835942264687930, 17.8385850782679398 },
         new double[] { 0.0000000000000000, 0.0000000000000000, 0.0000000000000000, 13.5113310060192049 }
     };
     assertTrue(FuzzyEquals.ArrayFuzzyEquals(result.U.toArray(), expectedRaw));
 }
 public virtual void testGetL()
 {
     double[][] expectedRaw = new double[][]
     {
         new double[] { 1.0000000000000000, 0.0000000000000000, 0.0000000000000000, 0.0000000000000000 },
         new double[] { 0.0900000000000000, 1.0000000000000000, 0.0000000000000000, 0.0000000000000000 },
         new double[] { 0.1000000000000000, 0.2053262858304534, 1.0000000000000000, 0.0000000000000000 },
         new double[] { 0.0800000000000000, 0.1886562309412482, 0.6500406024227509, 1.0000000000000000 }
     };
     assertTrue(FuzzyEquals.ArrayFuzzyEquals(result.L.toArray(), expectedRaw));
 }
 public virtual void testGetUT()
 {
     double[][] expectedRaw = new double[][]
     {
         new double[] { 0.9320471908445913, 0.2498760786359523, 0.2000644169325719, 0.1697769373079140 },
         new double[] { -0.3602912226875036, 0.7104436117020503, 0.4343672993809221, 0.4204582722157035 },
         new double[] { 0.0345478327447140, 0.6575672695227724, -0.5228856286213198, -0.5412969173072171 },
         new double[] { -0.0168735338827667, -0.0209070794141986, 0.7056131359939679, -0.7080877630614966 }
     };
     assertTrue(FuzzyEquals.ArrayFuzzyEquals(result.UT.toArray(), expectedRaw));
 }
 public virtual void testGetP()
 {
     double[][] expectedRaw = new double[][]
     {
         new double[] { 1.0000000000000000, 0.0000000000000000, 0.0000000000000000, 0.0000000000000000 },
         new double[] { 0.0000000000000000, 1.0000000000000000, 0.0000000000000000, 0.0000000000000000 },
         new double[] { 0.0000000000000000, 0.0000000000000000, 1.0000000000000000, 0.0000000000000000 },
         new double[] { 0.0000000000000000, 0.0000000000000000, 0.0000000000000000, 1.0000000000000000 }
     };
     assertTrue(FuzzyEquals.ArrayFuzzyEquals(result.P.toArray(), expectedRaw));
 }
 public virtual void testGetVT()
 {
     double[][] expectedRaw = new double[][]
     {
         new double[] { 0.9376671168414974, 0.2351530657721294, 0.2207749536020079, 0.1293902373216524 },
         new double[] { -0.3419893959342725, 0.6435317248168104, 0.4819422340068079, 0.4864584826101194 },
         new double[] { -0.0061377112645623, 0.7254395669946609, -0.4331430581376550, -0.5348708763114625 },
         new double[] { -0.0615301516583371, -0.0656307050919645, 0.7289562360867203, -0.6786232068359547 }
     };
     assertTrue(FuzzyEquals.ArrayFuzzyEquals(result.VT.toArray(), expectedRaw));
 }
 public virtual void testGetQT()
 {
     double[][] expectedRaw = new double[][]
     {
         new double[] { -0.9879705944808324, -0.0889173535032749, -0.0987970594480833, -0.0790376475584666 },
         new double[] { 0.1189683945357854, -0.9595057553635415, -0.1873133740004731, -0.1735192394127411 },
         new double[] { 0.0984381737009301, 0.2632608647546777, -0.8116464267094188, -0.5120876107238650 },
         new double[] { 0.0083994941034602, 0.0462182513606091, 0.5444106161481449, -0.8375024792591188 }
     };
     assertTrue(FuzzyEquals.ArrayFuzzyEquals(result.QT.toArray(), expectedRaw));
 }
 public virtual void testGetR()
 {
     double[][] expectedRaw = new double[][]
     {
         new double[] { -101.2175874045612574, -15.2147471550048152, -16.0150033365342956, -6.6095232770767698 },
         new double[] { 0.0000000000000000, -50.7002117254876197, -25.9433980408179785, -23.0657374934840220 },
         new double[] { 0.0000000000000000, 0.0000000000000000, -27.7931604217022681, -27.3356769161449193 },
         new double[] { 0.0000000000000000, 0.0000000000000000, 0.0000000000000000, -11.3157732156316868 }
     };
     assertTrue(FuzzyEquals.ArrayFuzzyEquals(result.R.toArray(), expectedRaw));
 }
        public virtual void testSolveForMatrix()
        {
            double[][] expectedRaw = new double[][]
            {
                new double[] { 0.0103938059732010, 0.0181642215147756 },
                new double[] { -0.0147149030138629, -0.0077127926530197 },
                new double[] { -0.0171480759531631, -0.0032615794123952 },
                new double[] { 0.2645342893362958, 0.2856087765235678 }
            };

            assertTrue(FuzzyEquals.ArrayFuzzyEquals(result.solve(DoubleMatrix.copyOf(rawRHSmat)).toArray(), expectedRaw));
        }
        public virtual void testGetS()
        {
            double[][] expectedRaw = new double[][]
            {
                new double[] { 105.3811759900660974, 0.0000000000000000, 0.0000000000000000, 0.0000000000000000 },
                new double[] { 0.0000000000000000, 64.1183348155958299, 0.0000000000000000, 0.0000000000000000 },
                new double[] { 0.0000000000000000, 0.0000000000000000, 30.3603275655027289, 0.0000000000000000 },
                new double[] { 0.0000000000000000, 0.0000000000000000, 0.0000000000000000, 7.8674899136406147 }
            };

            assertTrue(FuzzyEquals.ArrayFuzzyEquals(result.S.toArray(), expectedRaw));
        }
 public virtual void testGetSingularValues()
 {
     double[] expectedRaw = new double[] { 105.3811759900660974, 64.1183348155958299, 30.3603275655027289, 7.8674899136406147 };
     assertTrue(FuzzyEquals.ArrayFuzzyEquals(result.SingularValues, expectedRaw));
 }