The Fast Linear Algorithm
N dimensional ball



N components: S=(Sx,Sy,Sz,Su,...)
Norm S=1
P(x)=rN-1.dr.sinN-2(a).da.sinN-3(b).db ... dp

   =rN-1.dr.(1-z2)(N-3)/2.dz.(1-y2)(N-4)/2.dy ... dw
Example N=5

The Fast Linear Algorithm (FLA) uses the rejection method with a function consisting of n steps (see the figure and article for more details)

Download the Fast Linear Algorithm:
1.  To use the Fast Linear Algorithm you must have :
2.  AND you must have the tables in the file "ball.res". Two choices: . You can choose to download the file ball.res already done or make one with create_ball.out (.exe for windows), run it, and follow the instructions.
  • ball.res   (380 Ko)
    h → [0,100[ with rate=95%
or

Download the Article:

Probabilities and Performances :
  • Figure: comparison of the time of simulation for various algorithms as function of the number of components N.
    The Fast Linear Algorithm (FLA) is the fastest of all algorithms proposed We can show more generally that another algorithm cannot be faster (see article).
    More...

Other Algorithms in C