<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_class_bsimplex">
<title>Bsimplex Class Reference</title>
<indexterm><primary>Bsimplex</primary></indexterm>
<para>

<para>Structure used in the downhill simplex method. </para>
 
</para>
<para>
<computeroutput>#include &lt;simplex.h&gt;</computeroutput>
</para>
<simplesect>
    <title>Public Member Functions    </title>
        <itemizedlist>
            <listitem><para><link linkend="_class_bsimplex_1a00d532073a0c0a91f199b9b45ca098f8">Bsimplex</link> ()</para>
</listitem>
            <listitem><para><link linkend="_class_bsimplex_1a2274f13894dd5c379c4ca579760af850">Bsimplex</link> (long nv, long np, long nc, long n, vector&lt; double &gt; &amp;ax, vector&lt; double &gt; &amp;ay)</para>

<para>Initializes a <link linkend="_class_bsimplex">Bsimplex</link> structure. </para>
</listitem>
            <listitem><para>long <link linkend="_class_bsimplex_1a396062320022f882e581c01a58c0913b">variables</link> ()</para>
</listitem>
            <listitem><para>long <link linkend="_class_bsimplex_1a500e021991312b906e4818c5c529b591">constants</link> ()</para>
</listitem>
            <listitem><para>double <link linkend="_class_bsimplex_1a062664b3802c8443a732b8e0448c02bb">constant</link> (long i)</para>
</listitem>
            <listitem><para>void <link linkend="_class_bsimplex_1a59a230d5a4cd5d540760abe88eebbdd1">constant</link> (long i, double p)</para>
</listitem>
            <listitem><para>void <link linkend="_class_bsimplex_1a7d8d6511504b9b04655179dc40c53120">constants</link> (long n, vector&lt; double &gt; &amp;p)</para>
</listitem>
            <listitem><para>long <link linkend="_class_bsimplex_1ad2c14f9c9a9a915d1b63bdc710f1605b">points</link> ()</para>
</listitem>
            <listitem><para>long <link linkend="_class_bsimplex_1acc63a985d6749abbd360dcc4a72397be">parameters</link> ()</para>
</listitem>
            <listitem><para>void <link linkend="_class_bsimplex_1ae99c46cb3d721d2c1acd2abbc3cbeb94">parameters</link> (long n, vector&lt; double &gt; &amp;p)</para>
</listitem>
            <listitem><para>void <link linkend="_class_bsimplex_1a9d3ae6fad16d885e2984e8f4a7e2f2fe">parameter</link> (long i, double p)</para>
</listitem>
            <listitem><para>double <link linkend="_class_bsimplex_1ab214726a1f74d315407e21991987b9bd">parameter</link> (long i)</para>
</listitem>
            <listitem><para>void <link linkend="_class_bsimplex_1a14dcce182c5acdbc11bdb6e34c50288d">limit_low</link> (long i, double v)</para>
</listitem>
            <listitem><para>double <link linkend="_class_bsimplex_1ad50bb9a5432c826690d62f2e6c8c2d75">limit_low</link> (long i)</para>
</listitem>
            <listitem><para>void <link linkend="_class_bsimplex_1a3fc11cbe33afbbbdb3fbbe0c5f454c41">limit_high</link> (long i, double v)</para>
</listitem>
            <listitem><para>double <link linkend="_class_bsimplex_1a1e760582e82c22a29cd754a62392b82f">limit_high</link> (long i)</para>
</listitem>
            <listitem><para>void <link linkend="_class_bsimplex_1a268a84d0bd0bd31c609bf84075ed3063">limits</link> (long i, double vlo, double vhi)</para>
</listitem>
            <listitem><para>void <link linkend="_class_bsimplex_1adc809a9788235a8b3bf3d6b58552ab0f">limits_low</link> (long n, vector&lt; double &gt; &amp;p)</para>
</listitem>
            <listitem><para>void <link linkend="_class_bsimplex_1addf57b6bfc324503420b8ead7e185609">limits_high</link> (long n, vector&lt; double &gt; &amp;p)</para>
</listitem>
            <listitem><para>vector&lt; double &gt; &amp; <link linkend="_class_bsimplex_1a3842fb157c64cd206a195adf5d532e95">independent_values</link> ()</para>
</listitem>
            <listitem><para>vector&lt; double &gt; &amp; <link linkend="_class_bsimplex_1af1c5e52fba442109098ed77f0f79ba88">dependent_values</link> ()</para>
</listitem>
            <listitem><para>double <link linkend="_class_bsimplex_1a19eece3c0ab90f16ea48bf8c4ed4ac46">run</link> (long maxcycles, double tolerance, double(funk)(<link linkend="_class_bsimplex">Bsimplex</link> &amp;))</para>
</listitem>
            <listitem><para>double <link linkend="_class_bsimplex_1af2ef789af18e627a35cd5bb5cecacc8f">amotry</link> (vector&lt; double &gt; &amp;mp, vector&lt; double &gt; &amp;R, long ihi, double fac, double(funk)(<link linkend="_class_bsimplex">Bsimplex</link> &amp;))</para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Structure used in the downhill simplex method. </para>



<para><literallayout><computeroutput>Nelder and Mead downhill simplex method for generalized parameter fitting
Adapted from Numerical Recipes, 2nd edition, Press et al. 1992
The structure is set up to accommodate any number of variables, parameters,
constants and points.
The structure is very flexible in the sense that only some fields
are absolutely required and with a fixed meaning for the simplex method.
The required fields are:
    nparam, param, lo, hi
The other fields may be recast and used as desired in the user function.
Intended sizes:
    param       nparam.
    lo          nparam.
    hi          nparam.
    c           nconstant.
    x           npoint*nvar.
    fx          npoint.
x or fx can be recast as a different pointer, as long as it is handled
by the user before calling kill_simplex.
</computeroutput></literallayout> </para>
<para>
Definition at line 42 of file simplex.h.</para>
</section>
<section>
<title>Constructor &amp; Destructor Documentation</title>
<anchor xml:id="_class_bsimplex_1a00d532073a0c0a91f199b9b45ca098f8"/>    <section>
    <title>Bsimplex()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>Bsimplex</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>Bsimplex</secondary></indexterm>
<para><computeroutput>Bsimplex::Bsimplex ( )<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 55 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1a2274f13894dd5c379c4ca579760af850"/>    <section>
    <title>Bsimplex()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>Bsimplex</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>Bsimplex</secondary></indexterm>
<para><computeroutput>Bsimplex::Bsimplex (long nv, long np, long nc, long n, vector&lt; double &gt; &amp; ax, vector&lt; double &gt; &amp; ay)</computeroutput></para><para>

<para>Initializes a <link linkend="_class_bsimplex">Bsimplex</link> structure. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>nv</entry>
                                <entry>
<para>number of independent variables. </para>
</entry>
                            </row>
                            <row>
                                <entry>np</entry>
                                <entry>
<para>number of parameters to determine. </para>
</entry>
                            </row>
                            <row>
                                <entry>nc</entry>
                                <entry>
<para>number of constants. </para>
</entry>
                            </row>
                            <row>
                                <entry>n</entry>
                                <entry>
<para>number of points or function values. </para>
</entry>
                            </row>
                            <row>
                                <entry>ax</entry>
                                <entry>
<para>array of independent variables (nv*n). </para>
</entry>
                            </row>
                            <row>
                                <entry>ay</entry>
                                <entry>
<para>array of dependent variables (n). <literallayout><computeroutput>The minimum setup of the simplex structure requires a number of
parameters greater than 0
</computeroutput></literallayout> Reference: Press W.H. et al (1992) Numerical Recipes in C. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                </para>
<para>
Definition at line 33 of file simplex.cpp.</para>
</section>
</section>
<section>
<title>Member Function Documentation</title>
<anchor xml:id="_class_bsimplex_1af2ef789af18e627a35cd5bb5cecacc8f"/>    <section>
    <title>amotry()</title>
<indexterm><primary>amotry</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>amotry</secondary></indexterm>
<para><computeroutput>double Bsimplex::amotry (vector&lt; double &gt; &amp; mp, vector&lt; double &gt; &amp; R, long ihi, double fac, double(funk)(<link linkend="_class_bsimplex">Bsimplex</link> &amp;) )</computeroutput></para><para>
Definition at line 226 of file simplex.cpp.</para>
    </section><anchor xml:id="_class_bsimplex_1a062664b3802c8443a732b8e0448c02bb"/>    <section>
    <title>constant()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>constant</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>constant</secondary></indexterm>
<para><computeroutput>double Bsimplex::constant (long i)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 59 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1a59a230d5a4cd5d540760abe88eebbdd1"/>    <section>
    <title>constant()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>constant</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>constant</secondary></indexterm>
<para><computeroutput>void Bsimplex::constant (long i, double p)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 60 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1a500e021991312b906e4818c5c529b591"/>    <section>
    <title>constants()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>constants</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>constants</secondary></indexterm>
<para><computeroutput>long Bsimplex::constants ( )<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 58 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1a7d8d6511504b9b04655179dc40c53120"/>    <section>
    <title>constants()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>constants</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>constants</secondary></indexterm>
<para><computeroutput>void Bsimplex::constants (long n, vector&lt; double &gt; &amp; p)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 61 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1af1c5e52fba442109098ed77f0f79ba88"/>    <section>
    <title>dependent_values()</title>
<indexterm><primary>dependent_values</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>dependent_values</secondary></indexterm>
<para><computeroutput>vector&lt;double&gt;&amp; Bsimplex::dependent_values ( )<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 83 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1a3842fb157c64cd206a195adf5d532e95"/>    <section>
    <title>independent_values()</title>
<indexterm><primary>independent_values</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>independent_values</secondary></indexterm>
<para><computeroutput>vector&lt;double&gt;&amp; Bsimplex::independent_values ( )<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 82 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1a3fc11cbe33afbbbdb3fbbe0c5f454c41"/>    <section>
    <title>limit_high()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>limit_high</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>limit_high</secondary></indexterm>
<para><computeroutput>void Bsimplex::limit_high (long i, double v)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 73 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1a1e760582e82c22a29cd754a62392b82f"/>    <section>
    <title>limit_high()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>limit_high</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>limit_high</secondary></indexterm>
<para><computeroutput>double Bsimplex::limit_high (long i)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 74 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1a14dcce182c5acdbc11bdb6e34c50288d"/>    <section>
    <title>limit_low()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>limit_low</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>limit_low</secondary></indexterm>
<para><computeroutput>void Bsimplex::limit_low (long i, double v)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 71 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1ad50bb9a5432c826690d62f2e6c8c2d75"/>    <section>
    <title>limit_low()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>limit_low</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>limit_low</secondary></indexterm>
<para><computeroutput>double Bsimplex::limit_low (long i)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 72 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1a268a84d0bd0bd31c609bf84075ed3063"/>    <section>
    <title>limits()</title>
<indexterm><primary>limits</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>limits</secondary></indexterm>
<para><computeroutput>void Bsimplex::limits (long i, double vlo, double vhi)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 75 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1addf57b6bfc324503420b8ead7e185609"/>    <section>
    <title>limits_high()</title>
<indexterm><primary>limits_high</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>limits_high</secondary></indexterm>
<para><computeroutput>void Bsimplex::limits_high (long n, vector&lt; double &gt; &amp; p)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 79 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1adc809a9788235a8b3bf3d6b58552ab0f"/>    <section>
    <title>limits_low()</title>
<indexterm><primary>limits_low</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>limits_low</secondary></indexterm>
<para><computeroutput>void Bsimplex::limits_low (long n, vector&lt; double &gt; &amp; p)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 76 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1a9d3ae6fad16d885e2984e8f4a7e2f2fe"/>    <section>
    <title>parameter()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>parameter</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>parameter</secondary></indexterm>
<para><computeroutput>void Bsimplex::parameter (long i, double p)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 69 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1ab214726a1f74d315407e21991987b9bd"/>    <section>
    <title>parameter()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>parameter</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>parameter</secondary></indexterm>
<para><computeroutput>double Bsimplex::parameter (long i)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 70 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1acc63a985d6749abbd360dcc4a72397be"/>    <section>
    <title>parameters()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>parameters</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>parameters</secondary></indexterm>
<para><computeroutput>long Bsimplex::parameters ( )<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 65 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1ae99c46cb3d721d2c1acd2abbc3cbeb94"/>    <section>
    <title>parameters()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>parameters</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>parameters</secondary></indexterm>
<para><computeroutput>void Bsimplex::parameters (long n, vector&lt; double &gt; &amp; p)<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 66 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1ad2c14f9c9a9a915d1b63bdc710f1605b"/>    <section>
    <title>points()</title>
<indexterm><primary>points</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>points</secondary></indexterm>
<para><computeroutput>long Bsimplex::points ( )<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 64 of file simplex.h.</para>
    </section><anchor xml:id="_class_bsimplex_1a19eece3c0ab90f16ea48bf8c4ed4ac46"/>    <section>
    <title>run()</title>
<indexterm><primary>run</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>run</secondary></indexterm>
<para><computeroutput>double Bsimplex::run (long maxcycles, double tolerance, double(funk)(<link linkend="_class_bsimplex">Bsimplex</link> &amp;) )</computeroutput></para><para>
Definition at line 76 of file simplex.cpp.</para>
    </section><anchor xml:id="_class_bsimplex_1a396062320022f882e581c01a58c0913b"/>    <section>
    <title>variables()</title>
<indexterm><primary>variables</primary><secondary>Bsimplex</secondary></indexterm>
<indexterm><primary>Bsimplex</primary><secondary>variables</secondary></indexterm>
<para><computeroutput>long Bsimplex::variables ( )<computeroutput>[inline]</computeroutput></computeroutput></para><para>
Definition at line 57 of file simplex.h.</para>
</section>
<para>
The documentation for this class was generated from the following files:</para>
/Users/bernard/b20/bsoft/include/<link linkend="_simplex_8h">simplex.h</link>/Users/bernard/b20/bsoft/src/util/<link linkend="_simplex_8cpp">simplex.cpp</link></section>
</section>
