|
The procedures are defined in the Startup code region of this worksheet.
It should run in Maple 15 and 16, but may not work in earlier versions since it relies on a properly functioning Threads:-Task.
The procedure `Lyapunov` can be called as
Lyapunov(W, xa, xb, ya, yb, xresolution)
Lyapunov(W, xa, xb, ya, yb, xresolution, numterms=N)
where those parameters are,
- W, a Vector or list whose entries should be only 0 or 1
- xa, the leftmost x-point (a float, usually greater than 2.0)
- xb, the rightmost x-point (a float, usually less than or equal to 4.0)
- ya, the lowest y-point (a float, usually greater than 2.0)
- yb, the highest y-point (a float, usually less than or equal to 4.0)
- xresolution, the width in pixels of the returned image (Array)
- numterms=N, (optional) where positive integer N is the number of terms added for the approx. Lyapunov exponent
The speed of calculation depends on whether the Compiler is functional and how many cores are detected. On a 4-core Intel i7 under Windows 7 the first example below had approximately the following performce in 64bit Maple 16.
|
|
Compiled
|
evalhf
|
|
serial (1 core)
|
20 seconds
|
240 seconds
|
|
parallel (4 cores)
|
5 seconds
|
60 seconds
|
|
| |
| > |
W:=[0,0,1,0,1]: res1:=CodeTools:-Usage( Lyapunov(W, 2.01, 4.0, 2.01, 4.0, 500) ):
|
memory used=46.36MiB, alloc change=65.73MiB, cpu time=33.87s, real time=5.17s
| > |
W:=[1,1,1,1,1,1,0,0,0,0,0,0]: res2:=CodeTools:-Usage( Lyapunov(W, 2.5, 3.4, 3.4, 4.0, 500) ):
|
memory used=30.94MiB, alloc change=0 bytes, cpu time=21.32s, real time=3.54s
| > |
W:=[1,0,1,0,1,1,0,1]: res3:=CodeTools:-Usage( Lyapunov(W, 2.1, 3.7, 3.1, 4.0, 500) ):
|
memory used=26.18MiB, alloc change=15.09MiB, cpu time=18.44s, real time=2.95s
| > |
W:=[0,1]: res4:=CodeTools:-Usage( Lyapunov(W, 2.01, 4.0, 2.01, 4.0, 500) ):
|
memory used=46.25MiB, alloc change=15.09MiB, cpu time=33.52s, real time=5.18s
|