Convert text equations into mml
[scilab.git] / scilab / modules / optimization / help / en_US / karmarkar.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  -->
13 <refentry version="5.0-subset Scilab" xml:id="karmarkar" xml:lang="en"
14           xmlns="http://docbook.org/ns/docbook"
15           xmlns:xlink="http://www.w3.org/1999/xlink"
16           xmlns:svg="http://www.w3.org/2000/svg"
17           xmlns:ns4="http://www.w3.org/1999/xhtml"
18           xmlns:mml="http://www.w3.org/1998/Math/MathML"
19           xmlns:db="http://docbook.org/ns/docbook">
20   <info>
21     <pubdate>$LastChangedDate$</pubdate>
22   </info>
23
24   <refnamediv>
25     <refname>karmarkar</refname>
26
27     <refpurpose>karmarkar algorithm</refpurpose>
28   </refnamediv>
29
30   <refsynopsisdiv>
31     <title>Calling Sequence</title>
32
33     <synopsis>[x1]=karmarkar(a,b,c,x0)</synopsis>
34   </refsynopsisdiv>
35
36   <refsection>
37     <title>Parameters</title>
38
39     <variablelist>
40       <varlistentry>
41         <term>a</term>
42
43         <listitem>
44           <para>matrix (n,p)</para>
45         </listitem>
46       </varlistentry>
47
48       <varlistentry>
49         <term>b</term>
50
51         <listitem>
52           <para>n - vector</para>
53         </listitem>
54       </varlistentry>
55
56       <varlistentry>
57         <term>c</term>
58
59         <listitem>
60           <para>p - vector</para>
61         </listitem>
62       </varlistentry>
63
64       <varlistentry>
65         <term>x0</term>
66
67         <listitem>
68           <para>initial vector</para>
69         </listitem>
70       </varlistentry>
71
72       <varlistentry>
73         <term>eps</term>
74
75         <listitem>
76           <para>threshold (default value : 1.d-5)</para>
77         </listitem>
78       </varlistentry>
79
80       <varlistentry>
81         <term>gamma</term>
82
83         <listitem>
84           <para>descent step <literal>0&lt;gamma&lt;1</literal> , default
85           value : 1/4</para>
86         </listitem>
87       </varlistentry>
88
89       <varlistentry>
90         <term>x1</term>
91
92         <listitem>
93           <para>solution</para>
94         </listitem>
95       </varlistentry>
96
97       <varlistentry>
98         <term>crit</term>
99
100         <listitem>
101           <para>value of c'*x1</para>
102         </listitem>
103       </varlistentry>
104     </variablelist>
105   </refsection>
106
107   <refsection>
108     <title>Description</title>
109
110     <para>Computes <literal>x</literal> which minimizes</para>
111
112     <informalequation>
113       <mediaobject>
114         <imageobject>
115           <imagedata fileref="../mml/karmarkar_equation_1.mml" />
116         </imageobject>
117       </mediaobject>
118     </informalequation>
119   </refsection>
120
121   <refsection>
122     <title>Examples</title>
123
124     <programlisting role="example"> 
125 // n=10;p=20;
126 // a=rand(n,p);c=rand(p,1);x0=abs(rand(p,1));b=a*x0;x1=karmarkar(a,b,c,x0);
127   </programlisting>
128   </refsection>
129 </refentry>