WIGXJPF with MATLIB

The following uses the MATLAB interface to shared libraries.

Tested with GNU/Linux.

First compile the shared library:

make shared

To allow parsing of the header without errors, make a copy:

cp inc/wigxjpf.h inc/wigxjpf_cleaned.h

Then modify inc/wigxjpf_cleaned.h by hiding the normal (non-simpified) interface:

  * And then the normal interface.
  */

+#if 0
 #include 

 /* When calculating symbols up to a maximum j, the largest
and
                         int two_j4, int two_j5, int two_j6,
                         int two_j7, int two_j8, int two_j9,
                         struct wigxjpf_temp *temp);
+#endif

 /**********************************************************************/

Now, in MATLAB, load the library:

loadlibrary('path/to/wigxjpf-1.11/lib/libwigxjpf_shared.so','path/to/wigxjpf-1.11/inc/wigxjpf_cleaned.h','alias','wigxjpf');

To see the available functions:

libfunctions('wigxjpf','-full')

Remember to initialize WIGXJPF before use:

calllib('wigxjpf','wig_table_init',2*100,9);
calllib('wigxjpf','wig_temp_init',2*100);

Evaluate something:

calllib('wigxjpf','wig6jj',2*2,2*2,2*1,2*2,2*1,2*1)

To unload the library

calllib('wigxjpf','wig_temp_free');
calllib('wigxjpf','wig_table_free');
unloadlibrary('wigxjpf');

E-mail: f96hajo@chalmers.se
Back to WIGXJPF / FASTWIGXJ.