Esempio n. 1
0
 def test_logistic_extrema(self):
     logistic_extrema = extrema(
         'logistic', coefficients[:3],
         logistic_derivatives_object['first']['evaluation'], precision)
     self.assertEqual(logistic_extrema, {
         'maxima': [None],
         'minima': [None]
     })
Esempio n. 2
0
 def test_exponential_extrema(self):
     exponential_extrema = extrema(
         'exponential', coefficients[:2],
         exponential_derivatives_object['first']['evaluation'], precision)
     self.assertEqual(exponential_extrema, {
         'maxima': [None],
         'minima': [None]
     })
Esempio n. 3
0
 def test_hyperbolic_extrema(self):
     hyperbolic_extrema = extrema(
         'hyperbolic', coefficients[:2],
         hyperbolic_derivatives_object['first']['evaluation'], precision)
     self.assertEqual(hyperbolic_extrema, {
         'maxima': [None],
         'minima': [None]
     })
Esempio n. 4
0
 def test_quadratic_extrema(self):
     quadratic_extrema = extrema(
         'quadratic', coefficients[:3],
         quadratic_derivatives_object['first']['evaluation'], precision)
     self.assertEqual(quadratic_extrema, {
         'maxima': [None],
         'minima': [-0.75]
     })
Esempio n. 5
0
 def test_sinusoidal_extrema(self):
     sinusoidal_extrema = extrema(
         'sinusoidal', coefficients[:3],
         sinusoidal_derivatives_object['first']['evaluation'], precision)
     self.assertEqual(
         sinusoidal_extrema, {
             'maxima': [5.5236, 7.618, 9.7124, '1.0472k'],
             'minima': [6.5708, 8.6652, '1.0472k']
         })
Esempio n. 6
0
 def test_cubic_extrema(self):
     cubic_extrema = extrema(
         'cubic', coefficients,
         cubic_derivatives_object['first']['evaluation'], precision)
     self.assertEqual(cubic_extrema, {'maxima': [None], 'minima': [None]})
Esempio n. 7
0
 def test_linear_extrema(self):
     linear_extrema = extrema(
         'linear', coefficients[:2],
         linear_derivatives_object['first']['evaluation'], precision)
     self.assertEqual(linear_extrema, {'maxima': [None], 'minima': [None]})