Add __call__

This commit is contained in:
2024-04-10 11:40:33 +02:00
parent 5af3f35482
commit acc677d469
2 changed files with 7 additions and 0 deletions

View File

@@ -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)

View File

@@ -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()