rafiter() removal (obsolete since 5.1) 01/18301/5
Samuel GOUGEON [Sat, 25 Jun 2016 01:43:06 +0000 (03:43 +0200)]
  * All files containing the pattern "rafiter" have been visited

  * scilab/modules/slint/src/cpp/DeprecatedChecker.cpp  is OK
    Line 118:     map.emplace(L"rafiter", L"taucs_chsolve");

Change-Id: I5d42fca49949810f85795e5a0adc1e56d60755e0

scilab/CHANGES.md
scilab/modules/helptools/data/configuration/scilab_macros.txt
scilab/modules/umfpack/demos/sparse_matrices.sce
scilab/modules/umfpack/help/en_US/rafiter.xml [deleted file]
scilab/modules/umfpack/help/en_US/res_with_prec.xml
scilab/modules/umfpack/help/en_US/taucs_chsolve.xml
scilab/modules/umfpack/macros/rafiter.sci [deleted file]

index 3a2d140..e936aba 100644 (file)
@@ -213,6 +213,7 @@ Removed Functions
 * `gspec` was obsolete already in Scilab 4 and is now removed. Please use `spec` instead.
 * `gschur` was obsolete already in Scilab 4 and is now removed. Please use `schur` instead.
 * `havewindow` has been removed. Please use `getscilabmode()=="STD"` instead
+* `rafiter` was obsolete since Scilab 5.1 and is now removed.
 
 * Symbolic module functions have been removed: `addf`, `cmb_lin`, `ldivf`, `mulf`, `rdivf`, `solve`, `subf`, `trianfml`, `trisolve` and `block2exp`.
 * Functionnalities based on former Scilab stack have been removed:
index 411ce68..4dcac5d 100644 (file)
@@ -179,8 +179,6 @@ function demo_sparse_matrices()
     x2 = taucs_chsolve(Cp2,b2);
     t2_chol = toc();
     norm_res_chol_2 = norm(A2*x2-b2);
-    [x2r, r2] = rafiter(A2, Cp2, b2, x2);
-    norm_res_chol_2r = norm(r2);
     K2_norm2 = cond2sp(A2, Cp2);
     taucs_chdel(Cp2);
     mode(-1)
diff --git a/scilab/modules/umfpack/help/en_US/rafiter.xml b/scilab/modules/umfpack/help/en_US/rafiter.xml
deleted file mode 100644 (file)
index f74b411..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="rafiter">
-    <refnamediv>
-        <refname>rafiter</refname>
-        <refpurpose>
-            Iterative refinement for a s.p.d. linear system. <emphasis role="bold">This function is obsolete.</emphasis>  
-        </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Syntax</title>
-        <synopsis>[xn, rn] = rafiter(A, C_ptr, b, x0, [, nb_iter, verb])</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Arguments</title>
-        <variablelist>
-            <varlistentry>
-                <term>A  </term>
-                <listitem>
-                    <para>a real symmetric positive definite sparse matrix</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>C_ptr  </term>
-                <listitem>
-                    <para>a pointer to a Cholesky factorization (got with taucs_chfact)</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>b  </term>
-                <listitem>
-                    <para>column vector (r.h.s of the linear system) but "matrix" (multiple r.h.s.) are allowed.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>x0  </term>
-                <listitem>
-                    <para>first solution obtained with taucs_chsolve(C_ptr, b)</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>nb_iter  </term>
-                <listitem>
-                    <para>(optional) number of raffinement iterations (default 2)</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>verb  </term>
-                <listitem>
-                    <para>(optional) boolean, must be %t for displaying the intermediary results, 
-                        and %f (default) if you do not want.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>xn  </term>
-                <listitem>
-                    <para>new refined solution</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>rn  </term>
-                <listitem>
-                    <para>
-                        residual (<literal>A*xn - b</literal>)
-                    </para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Description</title>
-        <para>
-            This function is somewhat obsolete, use <literal>x = taucs_chsolve(C_ptr,b,A)</literal>
-            (see <link linkend="taucs_chsolve">taucs_chsolve</link>) which do one iterative refinement step.
-        </para>
-        <para>
-            To use if you want to improve a little the solution got with taucs_chsolve.
-            Note that with verb=%t the displayed internal steps are essentially meaningful 
-            in the case where b is a column vector.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Caution</title>
-        <para>
-            Currently there is no verification for the input parameters !
-        </para>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[ 
-[A] = ReadHBSparse(SCI+"/modules/umfpack/demos/bcsstk24.rsa");
-C_ptr = taucs_chfact(A);
-b = rand(size(A,1),1);
-x0 = taucs_chsolve(C_ptr, b);
-norm(A*x0 - b)
-[xn, rn] = rafiter(A, C_ptr, b, x0, verb=%t);
-norm(A*xn - b)
-taucs_chdel(C_ptr)
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="taucs_chsolve">taucs_chsolve</link>
-            </member>
-            <member>
-                <link linkend="taucs_chfact">taucs_chfact</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
index 8ad0ae9..d26676e 100644 (file)
@@ -72,7 +72,7 @@ norm(res_with_prec(A, x0, b))
         <title>See also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="rafiter">rafiter</link>
+                <link linkend="taucs_chsolve">taucs_chsolve</link>
             </member>
         </simplelist>
     </refsection>
index e4fad27..97c3a82 100644 (file)
@@ -2,7 +2,7 @@
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="taucs_chsolve">
     <refnamediv>
         <refname>taucs_chsolve</refname>
-        <refpurpose>solve a linear sparse (s.p.d.) system given the Cholesky factors  </refpurpose>
+        <refpurpose>solves a linear s.p.d. system A*X = B from Cholesky factors of the sparse A</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
@@ -32,7 +32,7 @@
             <varlistentry>
                 <term>A  </term>
                 <listitem>
-                    <para>(optional) the real s.p.d. matrix A (to use for iterative refinement step)</para>
+                    <para>(optional) Real symetric positive definite (s.p.d.) matrix (to use for iterative refinement step)</para>
                 </listitem>
             </varlistentry>
         </variablelist>
     </refsection>
     <refsection>
         <title>Examples</title>
+// We get some square sparse matrix that we are sure it is symetric positive definite:
+A = ReadHBSparse(SCI+"/modules/umfpack/demos/bcsstk24.rsa");
+size(A)
+
+// We priorly compute its related Cholesky factors:
+Cfact = taucs_chfact(A);
+
+// We generate an arbitrary b for which we will look for an X such that A*x = b
+b = rand(size(A,1),1);
+
+// We call the solver
+x = taucs_chsolve(Cfact, b);
+
+// We accurately compute the numerical error r = A*x - b :
+r = res_with_prec(A, x, b);
+stdev(r, "*", 0)
+norm(r)
         <para>
-            see the example section of <link linkend="taucs_chfact">taucs_chfact</link>
+            Other examples are provided in the <link linkend="taucs_chfact">taucs_chfact</link> page.
         </para>
     </refsection>
     <refsection role="see also">
diff --git a/scilab/modules/umfpack/macros/rafiter.sci b/scilab/modules/umfpack/macros/rafiter.sci
deleted file mode 100644 (file)
index b4816bf..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-//   Copyright Bruno Pinçon, ESIAL-IECN, Inria CORIDA project
-//   <bruno.pincon@iecn.u-nancy.fr>
-//
-// This set of scilab 's macros provide a few sparse utilities.
-//
-// Copyright (C) 2012 - 2016 - Scilab Enterprises
-//
-// This file is hereby licensed under the terms of the GNU GPL v2.0,
-// pursuant to article 5.3.4 of the CeCILL v.2.1.
-// This file was originally licensed under the terms of the CeCILL v2.1,
-// and continues to be available under such terms.
-// For more information, see the COPYING file which you should have received
-// along with this program.
-
-function [xn, rn] = rafiter(A, C, b, x0, nb_iter, verb)
-    // raffinement iteratif
-    //
-    if ~exists("verb", "local") then , verb = %f , end
-    if ~exists("nb_iter", "local") then , nb_iter = 2, end
-
-    xn = x0
-    for i=1:nb_iter
-        rn = res_with_prec(A, xn, b)
-        dx = taucs_chsolve(C, rn)
-        if verb then
-            crit1 = norm(rn) ; crit2 = norm(dx)
-            mprintf(" it %2d : ||r|| = %e , ||dx|| = %e \n", i, crit1, crit2)
-        end
-        xn = xn - dx
-    end
-endfunction