The Fast Linear Algorithm
N dimensional sphere
radius=1



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

   =(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 "sphere.res". Two choices: . You can choose to download the file sphere.res already done or make one with create_sphere.out (.exe for windows), run it, and follow the instructions.
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