예제 #1
0
    def test_discrete_derivative(self):
        discrete_derivative = DiscreteDerivative(num_inputs=5, time_step=0.5)
        self.assertEqual(discrete_derivative.get_input_port(0).size(), 5)
        self.assertEqual(discrete_derivative.get_output_port(0).size(), 5)
        self.assertEqual(discrete_derivative.time_step(), 0.5)
        self.assertFalse(discrete_derivative.suppress_initial_transient())

        discrete_derivative = DiscreteDerivative(
            num_inputs=5, time_step=0.5, suppress_initial_transient=True)
        self.assertTrue(discrete_derivative.suppress_initial_transient())
예제 #2
0
 def test_discrete_derivative(self):
     discrete_derivative = DiscreteDerivative(num_inputs=5, time_step=0.5)
     self.assertEqual(discrete_derivative.get_input_port(0).size(), 5)
     self.assertEqual(discrete_derivative.get_output_port(0).size(), 5)
     self.assertEqual(discrete_derivative.time_step(), 0.5)