[BACK]Return to Matrix.texi CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-contrib / packages / doc

Annotation of OpenXM/src/asir-contrib/packages/doc/Matrix.texi, Revision 1.3

1.2       okutani     1: @c $OpenXM$
1.1       takayama    2: @node Matrix operations,,, $B$=$NB>$NH!?t(B
                      3: @section Matrix operations
                      4: $B%U%!%$%k(B @file{gr} $B$,I,MW$G$9(B.
                      5: @menu
1.3     ! okutani     6: * matrix_1::
        !             7: * matrix_diag::
        !             8: * matrix_trans::
        !             9: * matrix_inverse::
        !            10: * matrix_solve::
        !            11: * matrix_kernel::
1.1       takayama   12: @end menu
                     13:
1.3     ! okutani    14: @node matrix_1,,, Matrix operations
        !            15: @subsection @code{matrix_1}
        !            16: @findex matrix_1
1.1       takayama   17: @table @t
1.3     ! okutani    18: @item matrix_1(@var{N})
1.1       takayama   19: ::  @var{N} $B<!C10L9TNs$r@8@.$7$^$9(B.
                     20: @end table
                     21: @table @var
                     22: @item return
                     23: $B9TNs(B
                     24: @item N
                     25: $B@0?t(B
                     26: @end table
                     27: @itemize @bullet
1.3     ! okutani    28: @item  @code{matrix_1}$B$NNc(B.
1.1       takayama   29: @end itemize
                     30: @example
1.3     ! okutani    31: [297] matrix_1(1);
1.1       takayama   32: [ 1 ]
                     33:
1.3     ! okutani    34: [298] matrix_1(2);
1.1       takayama   35: [ 1 0 ]
                     36: [ 0 1 ]
                     37:
1.3     ! okutani    38: [299] matrix_1(3);
1.1       takayama   39: [ 1 0 0 ]
                     40: [ 0 1 0 ]
                     41: [ 0 0 1 ]
                     42: @end example
                     43:
1.3     ! okutani    44: @node matrix_diag,,, Matrix operations
        !            45: @subsection @code{matrix_diag}
        !            46: @findex matrix_diag
1.1       takayama   47: @table @t
1.3     ! okutani    48: @item matrix_diag(@var{L})
1.1       takayama   49: ::  $B%j%9%H(B @var{L} $B$NMWAG$rBP3Q@.J,$H$9$kBP3Q9TNs$r@8@.$7$^$9(B.
                     50: @end table
                     51: @table @var
                     52: @item return
                     53: $B9TNs(B
                     54: @item L
                     55: $B%j%9%H(B
                     56: @end table
                     57: @itemize @bullet
1.3     ! okutani    58: @item  @code{matrix_diag}$B$NNc(B.
1.1       takayama   59: @end itemize
                     60: @example
1.3     ! okutani    61: [301] matrix_diag([1,2,3]);
1.1       takayama   62: [ 1 0 0 ]
                     63: [ 0 2 0 ]
                     64: [ 0 0 3 ]
                     65:
1.3     ! okutani    66: [302] matrix_diag([a,b,c]);
1.1       takayama   67: [ a 0 0 ]
                     68: [ 0 b 0 ]
                     69: [ 0 0 c ]
                     70: @end example
                     71:
1.3     ! okutani    72: @node matrix_trans,,, Matrix operations
        !            73: @subsection @code{matrix_trans}
        !            74: @findex matrix_trans
1.1       takayama   75: @table @t
1.3     ! okutani    76: @item matrix_trans(@var{A})
1.1       takayama   77: ::  $B9TNs(B @var{A} $B$NE>CV9TNs$r5a$a$^$9(B.
                     78: @end table
                     79: @table @var
                     80: @item return
                     81: $B9TNs(B
                     82: @item A
                     83: $B9TNs(B or $B%j%9%H(B
                     84: @end table
                     85: @itemize @bullet
1.3     ! okutani    86: @item  @code{matrix_trans}$B$NNc(B.
1.1       takayama   87: @end itemize
                     88: @example
1.3     ! okutani    89: [303] matrix_trans([[a,b],[c,d]]);
1.1       takayama   90: [ a c ]
                     91: [ b d ]
                     92:
1.3     ! okutani    93: [304] matrix_trans([[1,2,3],[4,5,6],[7,8,9]]);
1.1       takayama   94: [ 1 4 7 ]
                     95: [ 2 5 8 ]
                     96: [ 3 6 9 ]
                     97: @end example
                     98:
1.3     ! okutani    99: @node matrix_inverse,,, Matrix operations
        !           100: @subsection @code{matrix_inverse}
        !           101: @findex matrix_inverse
1.1       takayama  102: @table @t
1.3     ! okutani   103: @item matrix_inverse(@var{A})
1.1       takayama  104: ::  $B9TNs(B @var{A} $B$N5U9TNs$r5a$a$^$9(B.
                    105: @end table
                    106: @table @var
                    107: @item return
                    108: $B9TNs(B
                    109: @item A
                    110: $B9TNs(B or $B%j%9%H(B
                    111: @end table
                    112: @itemize @bullet
                    113: @item $B9TNs(B @var{A} $B$N@.J,$OM-M}?t(B or $BB?9`<0(B.
1.3     ! okutani   114: @item @code{matrix_inverse}$B$NNc(B.
1.1       takayama  115: @end itemize
                    116: @example
1.3     ! okutani   117: [309] matrix_inverse([[1,1],[1,2]]);
1.1       takayama  118: [ 2 -1 ]
                    119: [ -1 1 ]
                    120:
1.3     ! okutani   121: [310] matrix_inverse([[a,b],[c,d]]);
1.1       takayama  122: [ (d)/(d*a-c*b) (-b)/(d*a-c*b) ]
                    123: [ (-c)/(d*a-c*b) (a)/(d*a-c*b) ]
                    124: @end example
                    125:
1.3     ! okutani   126: @node matrix_solve,,, Matrix operations
        !           127: @subsection @code{matrix_solve}
        !           128: @findex matrix_solve
1.1       takayama  129: @table @t
1.3     ! okutani   130: @item matrix_solve(@var{A},@var{X},@var{Y})
        !           131: ::  @code{matrix_solve}$B$OJ}Dx<0(B A*X=Y $B$N2r$r5a$a$^$9(B.
1.1       takayama  132: @end table
                    133: @table @var
                    134: @item return
                    135: $B%j%9%H(B
                    136: @item A
                    137: $B9TNs(B or $B%j%9%H(B
                    138: @item X
                    139: $B%Y%/%H%k(B or $B%j%9%H(B
                    140: @item Y
                    141: $B%Y%/%H%k(B or $B%j%9%H(B
                    142: @end table
                    143: @itemize @bullet
                    144: @item $B9TNs(B @var{A} $B$N@.J,$OM-M}?t(B or $BB?9`<0(B.
1.3     ! okutani   145: @item  @code{matrix_solve}$B$NNc(B.
1.1       takayama  146: @end itemize
                    147: @example
1.3     ! okutani   148: [376] matrix_solve([[1,-1],[2,3]],[x,y],[1,1]);
1.1       takayama  149: [[x,4/5],[y,-1/5]]
                    150:
1.3     ! okutani   151: [377] matrix_solve([[a,b],[c,d]],[x,y],[1,1]);
1.1       takayama  152: [[x,(-b+d)/(d*a-c*b)],[y,(a-c)/(d*a-c*b)]]
                    153: @end example
                    154:
1.3     ! okutani   155: @node matrix_kernel,,, Matrix operations
        !           156: @subsection @code{matrix_kernel}
        !           157: @findex matrix_kernel
1.1       takayama  158: @table @t
1.3     ! okutani   159: @item matrix_kernel(@var{A})
        !           160: ::  @code{matrix_kernel}$B$O9TNs(B A $B$N(B kernel $B$N4pDl$r5a$a$^$9(B.
1.1       takayama  161: @end table
                    162: @table @var
                    163: @item return
                    164: $B%j%9%H(B
                    165: @item A
                    166: $B9TNs(B or $B%j%9%H(B
                    167: @end table
                    168: @itemize @bullet
                    169: @item $B9TNs(B @var{A} $B$N@.J,$OM-M}?t(B or $BB?9`<0(B.
1.3     ! okutani   170: @item  @code{matrix_kernel}$B$NNc(B.
1.1       takayama  171: @end itemize
                    172: @example
1.3     ! okutani   173: [383] matrix_kernel([[1,2,3,4],[1,0,1,0]]);
1.1       takayama  174: [2,[[1,0,-1,1/2],[0,1,0,-1/2]]]
                    175:
1.3     ! okutani   176: [384] matrix_kernel([[1,2,3,4],[1,0,1,0],[0,0,0,1]]);
1.1       takayama  177: [1,[[1,1,-1,0]]]
                    178: @end example

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>