translation updated for sparse.
[scilab.git] / scilab / modules / sparse / help / ja_JP / iterativesolvers / qmr.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
5  * Copyright (C) XXXX-2008 - INRIA
6  * 
7  * This file must be used under the terms of the CeCILL.
8  * This source file is licensed as described in the file COPYING, which
9  * you should have received as part of this distribution.  The terms
10  * are also available at    
11  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
12  *
13  -->
14
15 <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="qmr">
16     
17     <refnamediv>
18         
19         <refname>qmr</refname>
20         
21         <refpurpose>プリコンディショナ付きのQuasi Minimal Residual法</refpurpose>
22         
23     </refnamediv>
24     
25     <refsynopsisdiv>
26         
27         <title>呼び出し手順</title>
28         
29         <synopsis>[x,flag,err,iter,res] = qmr(A,b,x0,M1,M1p,M2,M2p,maxi,tol)</synopsis>
30         
31     </refsynopsisdiv>
32     
33     <refsection>
34         
35         <title>Parameters</title>
36         
37         <variablelist>
38             
39             <varlistentry>
40                 
41                 <term>A</term>
42                 
43                 <listitem>
44                     
45                     <para>
46                         
47                         大きさn行n列の行列または<literal>A*x</literal>を返す関数
48                         
49                     </para>
50                     
51                 </listitem>
52                 
53             </varlistentry>
54             
55             <varlistentry>
56                 
57                 <term>b</term>
58                 
59                 <listitem>
60                     
61                     <para>右辺ベクトル</para>
62                     
63                 </listitem>
64                 
65             </varlistentry>
66             
67             <varlistentry>
68                 
69                 <term>x0</term>
70                 
71                 <listitem>
72                     
73                     <para>初期推定ベクトル (デフォルト: zeros(n,1))</para>
74                     
75                 </listitem>
76                 
77             </varlistentry>
78             
79             <varlistentry>
80                 
81                 <term>M1</term>
82                 
83                 <listitem>
84                     
85                     <para>
86                         
87                         左プリコンディショナ: 行列または<literal>M1*x</literal>を返す関数
88                         
89                         (前者のデフォルト値: eye(n,n))
90                         
91                     </para>
92                     
93                 </listitem>
94                 
95             </varlistentry>
96             
97             <varlistentry>
98                 
99                 <term>M1p</term>
100                 
101                 <listitem>
102                     
103                     <para>
104                         
105                         <literal>M1</literal>が関数の場合のみ指定する
106                         
107                         必要があります. この場合, <literal>M1p</literal> は
108                         
109                         <literal>M1'*x</literal>を返す関数です.
110                         
111                     </para>
112                     
113                 </listitem>
114                 
115             </varlistentry>
116             
117             <varlistentry>
118                 
119                 <term>M2</term>
120                 
121                 <listitem>
122                     
123                     <para>
124                         
125                         右プリコンディショナ: 行列または<literal>M2*x</literal>を
126                         
127                         返す関数 (前者のデフォルト値: eye(n,n))
128                         
129                     </para>
130                     
131                 </listitem>
132                 
133             </varlistentry>
134             
135             <varlistentry>
136                 
137                 <term>M2p</term>
138                 
139                 <listitem>
140                     
141                     <para>
142                         
143                         <literal>M2</literal>が関数の場合のみ指定する
144                         
145                         必要があります. この場合, 
146                         
147                         <literal>M2p</literal>は<literal>M2'*x</literal>を返す関数です.
148                         
149                     </para>
150                     
151                 </listitem>
152                 
153             </varlistentry>
154             
155             <varlistentry>
156                 
157                 <term>maxi</term>
158                 
159                 <listitem>
160                     
161                     <para>最大反復回数 (デフォルト: n)
162                         
163                     </para>
164                     
165                 </listitem>
166                 
167             </varlistentry>
168             
169             <varlistentry>
170                 
171                 <term>tol</term>
172                 
173                 <listitem>
174                     
175                     <para>許容誤差 (デフォルト: 1000*%eps)</para>
176                     
177                 </listitem>
178                 
179             </varlistentry>
180             
181             <varlistentry>
182                 
183                 <term>x</term>
184                 
185                 <listitem>
186                     
187                     <para>解ベクトル</para>
188                     
189                 </listitem>
190                 
191             </varlistentry>
192             
193             <varlistentry>
194                 
195                 <term>flag</term>
196                 
197                 <listitem>
198                     
199                     <variablelist>
200                         
201                         <varlistentry>
202                             
203                             <term>0 =</term>
204                             
205                             <listitem>
206                                 
207                                 <para>
208                                     
209                                     <literal>gmres</literal> は
210                                     
211                                     <literal>maxi</literal>回の反復の間に
212                                     
213                                     許容誤差内に収束しました
214                                     
215                                 </para>
216                                 
217                             </listitem>
218                             
219                         </varlistentry>
220                         
221                         <varlistentry>
222                             
223                             <term>1 =</term>
224                             
225                             <listitem>
226                                 
227                                 <para>
228                                     
229                                     指定した<literal>maxi</literal>回の反復の間に
230                                     
231                                     収束しませんでした
232                                     
233                                 </para>
234                                 
235                             </listitem>
236                             
237                         </varlistentry>
238                         
239                     </variablelist>
240                     
241                 </listitem>
242                 
243             </varlistentry>
244             
245             <varlistentry>
246                 
247                 <term>res</term>
248                 
249                 <listitem>
250                     
251                     <para>残差ベクトル</para>
252                     
253                 </listitem>
254                 
255             </varlistentry>
256             
257             <varlistentry>
258                 
259                 <term>err</term>
260                 
261                 <listitem>
262                     
263                     <para>最終残差ノルム</para>
264                     
265                 </listitem>
266                 
267             </varlistentry>
268             
269             <varlistentry>
270                 
271                 <term>iter</term>
272                 
273                 <listitem>
274                     
275                     <para>実行した反復回数</para>
276                     
277                 </listitem>
278                 
279             </varlistentry>
280             
281         </variablelist>
282         
283     </refsection>
284     
285     <refsection>
286         
287         <title>説明</title>
288         
289         <para>
290             
291             プリコンディショナ付きのQuasi Minimal Residual法により,
292             
293             線形システム<literal>Ax=b</literal>を解きます. 
294             
295         </para>
296         
297     </refsection>
298     
299     <refsection>
300         
301         <title>例</title>
302         
303         <programlisting role="example"><![CDATA[
304         // If A is a matrix
305 A=[ 94  0   0   0    0   28  0   0   32  0
306      0   59  13  5    0   0   0   10  0   0
307      0   13  72  34   2   0   0   0   0   65
308      0   5   34  114  0   0   0   0   0   55
309      0   0   2   0    70  0   28  32  12  0
310      28  0   0   0    0   87  20  0   33  0
311      0   0   0   0    28  20  71  39  0   0
312      0   10  0   0    32  0   39  46  8   0
313      32  0   0   0    12  33  0   8   82  11
314      0   0   65  55   0   0   0   0   11  100];
315 b=ones(10,1);
316 [x,flag,err,iter,res] = qmr(A, b)
317
318 [x,flag,err,iter,res] = qmr(A, b, zeros(10,1), eye(10,10), eye(10,10), 10, 1d-12)
319
320         // If A is a function
321         function y = Atimesx(x,t)
322         A=[ 94  0   0   0    0   28  0   0   32  0
323      0   59  13  5    0   0   0   10  0   0
324      0   13  72  34   2   0   0   0   0   65
325      0   5   34  114  0   0   0   0   0   55
326      0   0   2   0    70  0   28  32  12  0
327      28  0   0   0    0   87  20  0   33  0
328      0   0   0   0    28  20  71  39  0   0
329      0   10  0   0    32  0   39  46  8   0
330      32  0   0   0    12  33  0   8   82  11
331      0   0   65  55   0   0   0   0   11  100];
332          if (t == 'notransp') then
333         y = A*x;
334     elseif (t ==  'transp') then
335         y = A'*x;
336     end
337         endfunction
338
339          [x,flag,err,iter,res] = qmr(Atimesx, b)
340
341          [x,flag,err,iter,res] = qmr(Atimesx, b, zeros(10,1), eye(10,10), eye(10,10), 10, 1d-12)
342
343          // OR
344
345          function y = funA(x)
346         A = [ 94  0   0   0    0   28  0   0   32  0
347      0   59  13  5    0   0   0   10  0   0
348      0   13  72  34   2   0   0   0   0   65
349      0   5   34  114  0   0   0   0   0   55
350      0   0   2   0    70  0   28  32  12  0
351      28  0   0   0    0   87  20  0   33  0
352      0   0   0   0    28  20  71  39  0   0
353      0   10  0   0    32  0   39  46  8   0
354      32  0   0   0    12  33  0   8   82  11
355      0   0   65  55   0   0   0   0   11  100];
356          y = A*x
357         endfunction
358
359          function y = funAp(x)
360         A = [ 94  0   0   0    0   28  0   0   32  0
361      0   59  13  5    0   0   0   10  0   0
362      0   13  72  34   2   0   0   0   0   65
363      0   5   34  114  0   0   0   0   0   55
364      0   0   2   0    70  0   28  32  12  0
365      28  0   0   0    0   87  20  0   33  0
366      0   0   0   0    28  20  71  39  0   0
367      0   10  0   0    32  0   39  46  8   0
368      32  0   0   0    12  33  0   8   82  11
369      0   0   65  55   0   0   0   0   11  100];
370          y = A'*x
371         endfunction
372
373          [x,flag,err,iter,res] = qmr(funA, funAp, b)
374
375          [x,flag,err,iter,res] = qmr(funA, funAp, b, zeros(10,1), eye(10,10), eye(10,10), 10, 1d-12)
376
377          // If A is a matrix, M1 and M2 are functions
378          function y = M1timesx(x,t)
379          M1 = eye(10,10);
380     if(t=="notransp") then
381         y = M1*x;
382     elseif (t=="transp") then
383         y = M1'*x;
384     end
385         endfunction
386
387         function y = M2timesx(x,t)
388          M2 = eye(10,10);
389     if(t=="notransp") then
390         y = M2*x;
391     elseif (t=="transp") then
392         y = M2'*x;
393     end
394         endfunction
395
396         [x,flag,err,iter,res] = qmr(A, b, zeros(10,1), M1timesx, M2timesx, 10, 1d-12)
397
398         // OR
399
400         function y = funM1(x)
401         M1 = eye(10,10);
402         y = M1*x;
403         endfunction
404
405         function y = funM1p(x)
406         M1 = eye(10,10);
407         y = M1'*x;
408         endfunction
409
410         function y = funM2(x)
411         M2 = eye(10,10);
412         y = M2*x;
413         endfunction
414
415         function y = funM2p(x)
416         M2 = eye(10,10);
417         y = M2'*x;
418         endfunction
419
420         [x,flag,err,iter,res] = qmr(A, b, zeros(10,1), funM1, funM1p, funM2, funM2p, 10, 1d-12)
421
422         // If A, M1, M2 are functions
423         [x,flag,err,iter,res] = qmr(funA, funAp, b, zeros(10,1), funM1, funM1p, funM2, funM2p, 10, 1d-12)
424         [x,flag,err,iter,res] = qmr(Atimesx, b, zeros(10,1), M1timesx, M2timesx, 10, 1d-12)
425
426  ]]></programlisting>
427         
428     </refsection>
429     
430     <refsection role="see also">
431         
432         <title>参照</title>
433         
434         <simplelist type="inline">
435             
436             <member>
437                 
438                 <link linkend="gmres">gmres</link>
439                 
440             </member>
441             
442             <member>
443                 
444                 <link linkend="conjgrad">conjgrad</link>
445                 
446             </member>
447             
448         </simplelist>
449         
450     </refsection>
451     
452     <refsection>
453         
454         <title>履歴</title>
455         
456         <revhistory>
457             
458             <revision>
459                 
460                 <revnumber>5.4.0</revnumber>
461                 
462                 <revdescription>
463                     
464                     qmr(A, Ap) のコールは廃止されました. 
465                     
466                     qmr(A) を代わりに使用してください. 
467                     
468                     以下の関数が例となります :
469                     
470                     <programlisting role=""><![CDATA[
471 function y = A ( x, t )
472 Amat = eye(2,2);
473 if ( t== "notransp") then
474 y = Amat*x;
475 elseif (t == "transp") then
476 y = Amat'*x;
477 end
478 endfunction
479  ]]></programlisting>
480                     
481                 </revdescription>
482                 
483             </revision>
484             
485         </revhistory>
486         
487     </refsection>
488     
489 </refentry>
490