1
2
3 """
4 Box constrained minimization functions.
5
6 Contains amoeba.
7
8 Fit functions may be implemented in python or in C.
9
10 Installation
11 ~~~~~~~~~~~~
12
13 You can download the latest version from svn:
14
15 svn co svn://danse.us/boxmin/trunk
16
17 If you are installing from source, you will need a python
18 environment with numpy.
19 You will need a C compiler to build c lib.
20 On Windows this may require installing MinGW and
21 adding distutils.cfg to your distutils directory::
22
23 [build]
24 compiler = mingw
25
26 Once you have the required supporting packages, use the following
27 to build and install::
28
29 python setup.py install
30
31
32 Usage
33 ~~~~~
34
35 Example using python function:
36
37 >>> from boxmin import amoeba
38 >>> def quadratic(vec):
39 >>> return vec[0]**2+vec[1]**2+1
40 >>> F = amoeba.amoeba(quadratic,[1,1])
41 >>> p = F.fit(1e-7)
42
43 p should now contain the vector [x_0, x_1, f(x_0,x_1)] = [0, 0, 1]
44
45 See cfitfn_example in boxmin/python/tests for an example of how to
46 define a C function which is directly callable from the fit.
47 """
48
49 __docformat__ = 'restructuredtext en'
50