mirror of
https://github.com/BreizhHardware/py_A2.git
synced 2026-01-18 16:47:38 +01:00
Add __call__
This commit is contained in:
@@ -230,3 +230,6 @@ class polyCreux:
|
||||
LC.add(nodeMonome(-current2.coef, degre2))
|
||||
current2 = current2.next
|
||||
return LC
|
||||
|
||||
def __call__(self, x):
|
||||
return self.evaluate(x)
|
||||
|
||||
@@ -78,5 +78,9 @@ def test_polycreux():
|
||||
print("affichage pc somme")
|
||||
pc.afficher()
|
||||
|
||||
e = pc3(1)
|
||||
print(e)
|
||||
print(pc(1) + pc(0))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user