📄 readme
字号:
The archive, advh_v1_3.tar.gz, unpacks into a directory Cuba-1.3.
Change into this directory and type
./configure
make
This should create
libcuba.a -- the Cuba library,
Vegas, Suave, Divonne, Cuhre -- the MathLink executables,
demo-c, demo-fortran -- the demonstration programs,
partview -- the partition viewer.
Cuba can also be built in parts:
make lib -- builds only the Cuba library,
make math -- builds only the MathLink executables,
make demos -- builds only the demo programs, and
make tools -- builds only the partition viewer.
The MathLink executables require mcc, the MathLink compiler, and the
partition viewer needs Qt. Compilation of the corresponding parts will
be switched off by default if configure does not find these tools.
The code is C99 compliant and compiles flawlessly with the GNU C
compiler, versions 2.95 and higher. Configure should take care of most
C99 features. In particular if it finds that the C compiler cannot
handle variable-size arrays, it will fix the array sizes at compile
time. In this case, the maximum number of dimensions can be chosen with
the configure option
--with-maxdim=n (default: 16)
and the maximum number of components of the integrand with
--with-maxcomp=n (default: 4).
Linking Fortran or C/C++ code that uses one of the algorithms is
straightforward, just add "-lcuba" (for the Cuba library) and
"-lm" (for the math library) to the compiler command line, as in
f77 -o myexecutable mysource.f -lcuba -lm
cc -o myexecutable mysource.c -lcuba -lm
The demo/ subdirectory contains the source for the demonstration
programs in Fortran 77, C, and Mathematica, as well as the test
suite used in Sect. 8, which is also written in Mathematica.
A rough sanity-check on Cuba can be performed by typing
make check
which compiles and runs the demo program and compares it to the
test output in demo/demo-c.out.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -