//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testInternalKnots() public virtual void testInternalKnots() { BasisFunctionKnots knots = BasisFunctionKnots.fromInternalKnots(KNOTS, 2); assertEquals(2, knots.Degree); assertEquals(15, knots.NumKnots); assertEquals(12, knots.NumSplines); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testFirstOrder() public virtual void testFirstOrder() { BasisFunctionKnots knots = BasisFunctionKnots.fromInternalKnots(KNOTS, 1); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final java.util.function.Function<double, double> func = GENERATOR.generate(knots, 3); System.Func <double, double> func = GENERATOR.generate(knots, 3); assertEquals(0.0, func(1.76), 0.0); assertEquals(1.0, func(3.0), 0.0); assertEquals(0, func(4.0), 0.0); assertEquals(0.5, func(2.5), 0.0); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testThreeD() public virtual void testThreeD() { BasisFunctionKnots knots1 = BasisFunctionKnots.fromInternalKnots(KNOTS, 2); BasisFunctionKnots knots2 = BasisFunctionKnots.fromInternalKnots(KNOTS, 3); BasisFunctionKnots knots3 = BasisFunctionKnots.fromInternalKnots(KNOTS, 1); IList <System.Func <double[], double> > set = GENERATOR.generateSet(new BasisFunctionKnots[] { knots1, knots2, knots3 }); //pick of one of the basis functions for testing int index = FunctionUtils.toTensorIndex(new int[] { 3, 3, 3 }, new int[] { knots1.NumSplines, knots2.NumSplines, knots3.NumSplines }); System.Func <double[], double> func = set[index]; assertEquals(1.0 / 3.0, func(new double[] { 2.0, 2.0, 3.0 }), 0.0); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void testDegreeToHigh2() public virtual void testDegreeToHigh2() { BasisFunctionKnots.fromInternalKnots(KNOTS, 11); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void testWrongOrderInternalKnots() public virtual void testWrongOrderInternalKnots() { BasisFunctionKnots.fromInternalKnots(WRONG_ORDER_KNOTS, 3); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void testNegDegree2() public virtual void testNegDegree2() { BasisFunctionKnots.fromInternalKnots(KNOTS, -1); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void testNullInternalKnots() public virtual void testNullInternalKnots() { BasisFunctionKnots.fromInternalKnots(null, 2); }