Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VEC_$IMAT_MULTN                   Domain/OS                    VEC_$IMAT_MULTN


NAME
     vec_$imat_multn - multiply two 32-bit integer matrixes

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/vec.h>

     void vec_$imat_multn(
          long *matrix1,
          long *matrix2,
          long int &m,
          long int &n,
          long int &s,
          long *out_matrix)

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/vec.ins.pas';

     procedure vec_$imat_multn(
          in matrix1: univ vec_$integer32_matrix;
          in matrix2: univ vec_$integer32_matrix;
          in m: integer32;
          in n: integer32;
          in s: integer32;
          out out_matrix: univ vec_$integer32_matrix);

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'
     %include '/sys/ins/vec.ins.ftn'

           integer*4 m, n, s
           parameter (m = 3, n = 4, s = 5)

           integer*4 matrix1(m, n), matrix2(n, s), out_matrix(m, s)

           call vec_$imat_multn(matrix1, matrix2, m, n, s, out_matrix)

DESCRIPTION
     Vec_$imat_multn multiplies two variably dimensioned matrixes, matrix1 and
     matrix2, and supplies the result in out_matrix.

     In C, vec_$imat_multn calculates the product of matrix2 on the left and
     matrix1 on the right, and the resulting operation is

          for (i = 0; i < m; ++i)
               for (j = 0; j < s; ++j) {
                    out_matrix[j][i] = 0;
                    for (k = 0; k < n; ++k)
                         out_matrix[j][i] += matrix1[k][i]
                                          * matrix2[j][k];
               }

     In Pascal, vec_$imat_multn calculates the product of matrix2 on the left
     and matrix1 on the right, and the resulting operation is

          for i := 1 to m do
               for j := 1 to s do
                    begin
                    out_matrix[j,i] = 0;
                    for k := 1 to n do
                         out_matrix[j,i] := out_matrix[j,i]
                                         + matrix1[k,i]
                                         * matrix2[j,k];
                    end;

     In FORTRAN, vec_$imat_multn calculates the product of matrix1 on the left
     and matrix2 on the right, and the resulting operation is

           do 10 i = 1, m
               do 10 j = 1, s
                    out_matrix(i,j) = 0
                    do 10 k = 1, n
                         out_matrix(i,j) = out_matrix(i,j)
          &                              + matrix1(i,k)
          &                              * matrix2(k,j)
       10  continue

     matrix1
          A matrix to be multiplied.

     matrix2
          Another matrix to be multiplied.

     m, n, s
          The various matrix dimensions.

     out_matrix
          The product of matrix1 and matrix2.

SEE ALSO
     vec_$dmat_multn, vec_$imat_multn, vec_$mat_multn.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026