<?xml version="1.0" encoding="UTF-8"?>

<!--
 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 *
 * 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.
 *
 -->

<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="ja" xml:id="rowshuff">

    <refnamediv>

        <refname>rowshuff</refname>

        <refpurpose>シャッフルアルゴリズム</refpurpose>

    </refnamediv>

    <refsynopsisdiv>

        <title>呼び出し手順</title>

        <synopsis>[Ws,Fs1]=rowshuff(Fs, [alfa])</synopsis>

    </refsynopsisdiv>

    <refsection>

        <title>引数</title>

        <variablelist>

            <varlistentry>

                <term>Fs</term>

                <listitem>

                    <para>

                        正方実数ペンシル <literal>Fs = s*E-A</literal>

                    </para>

                </listitem>

            </varlistentry>

            <varlistentry>

                <term>Ws</term>

                <listitem>

                    <para>多項式行列</para>

                </listitem>

            </varlistentry>

            <varlistentry>

                <term>Fs1</term>

                <listitem>

                    <para>

                        正方実数ペンシル <literal>F1s = s*E1 -A1</literal>,

                        ただし  <literal>E1</literal> は正則

                    </para>

                </listitem>

            </varlistentry>

            <varlistentry>

                <term>alfa</term>

                <listitem>

                    <para>

                        実数 (<literal>alfa = 0</literal> がデフォルト値)

                    </para>

                </listitem>

            </varlistentry>

        </variablelist>

    </refsection>

    <refsection>

        <title>説明</title>

        <para>

            シャッフルアルゴリズム: ペンシル <literal>Fs=s*E-A</literal>を指定すると,

            以下のような(正方多項式行列) Ws=W(s) を返します:

        </para>

        <para>

            <literal> Fs1 = s*E1-A1 = W(s)*(s*E-A) </literal> は,

            正則なペンシル行列 <literal>E1</literal> です.

        </para>

        <para>

            これは,ペンシル<literal>Fs = s*E-A</literal>が正則 (すなわち,可逆)の場合に限り可能です.

            <literal>Ws</literal> の次数はペンシルの添字に等しくなります.

        </para>

        <para>

            <literal>Fs</literal>の無限大にある極は<literal>alfa</literal>に配置され,

            <literal>Ws</literal>のゼロは<literal>alfa</literal>に配置されます.

        </para>

        <para>

            <literal>(s*E-A)^-1 = (s*E1-A1)^-1 * W(s) = (W(s)*(s*E-A))^-1 *W(s)</literal>

            となることに注意してください.

        </para>

    </refsection>

    <refsection>

        <title>例</title>

        <programlisting role="example"><![CDATA[
F=randpencil([],[2],[1,2,3],[]);
F=rand(5,5)*F*rand(5,5);   // 3つの評価点を1,2,3に有する5 x 5 の正則ペンシル
[Ws,F1]=rowshuff(F,-1);
[E1,A1]=pen2ea(F1);
svd(E1)           //E1 正則
roots(det(Ws))
clean(inv(F)-inv(F1)*Ws,1.d-7)
 ]]></programlisting>

    </refsection>

    <refsection role="see also">

        <title>参照</title>

        <simplelist type="inline">

            <member>

                <link linkend="pencan">pencan</link>

            </member>

            <member>

                <link linkend="glever">glever</link>

            </member>

            <member>

                <link linkend="penlaur">penlaur</link>

            </member>

        </simplelist>

    </refsection>

</refentry>

