mirror of
https://github.com/ejeanboris/MDAF.git
synced 2025-08-14 22:28:29 +00:00
urgency
This commit is contained in:
18
SourceCode/TestFunctions/Matyas.py
Normal file
18
SourceCode/TestFunctions/Matyas.py
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
def main(args):
|
||||
"""
|
||||
>>> main([0,1])
|
||||
0.26
|
||||
|
||||
:param args: list of floats
|
||||
:return: float
|
||||
|
||||
"""
|
||||
for x in args:
|
||||
if x < -10 or x > 10:
|
||||
return 0
|
||||
return (0.26*(args[0]**2+args[1]**2))-(0.48*args[0]*args[1])
|
||||
|
||||
if __name__ == "__main__":
|
||||
import doctest
|
||||
doctest.testmod()
|
Reference in New Issue
Block a user