{
VOLLSTAENDIG: NEIN
SYNTAKTISCH: NEIN
AUSGETESTET: NEIN
BEMERKUNGEN:

}

MODULE mvc_ari;        {  komplexe Matrizen und Vektoren, Stand : 10.12.91  }
                

USE mv_ari, c_ari;


$off

PROCEDURE _MATH_ERROR ( errnum : INTEGER );
  EXTERNAL;

$on


{---------------------------------------------------------------------------}
{ 0. Vereinbarungen                                                         }
{---------------------------------------------------------------------------}


$off

GLOBAL TYPE CVECTOR  = GLOBAL DYNAMIC ARRAY [*] OF COMPLEX;
            CMATRIX  = GLOBAL DYNAMIC ARRAY [*] OF CVECTOR;

$on

{---------------------------------------------------------------------------}
{ 1. Transferfunktionen                                                     }
{---------------------------------------------------------------------------}
{    1.0 Zuweisungen                                                        }
{---------------------------------------------------------------------------}



GLOBAL OPERATOR := ( VAR A : CVECTOR; B : REAL );

VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO  A[i]:= B
END;




GLOBAL OPERATOR := ( VAR A : CVECTOR; VAR B : COMPLEX );

VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO  A[i]:= B
END;




GLOBAL OPERATOR := ( VAR A : CMATRIX; B : REAL );

VAR i : INTEGER;
    h : CVECTOR[LB(A,2)..UB(A,2)];

BEGIN
  FOR i:= LB(A,2) TO UB(A,2) DO  h[i]:= B;
  FOR i:= LB(A,1) TO UB(A,1) DO  A[i]:= h
END;




GLOBAL OPERATOR := ( VAR A : CMATRIX; VAR B : COMPLEX );

VAR i : INTEGER;
    h : CVECTOR[LB(A,2)..UB(A,2)];

BEGIN
  FOR i:= LB(A,2) TO UB(A,2) DO  h[i]:= B;
  FOR i:= LB(A,1) TO UB(A,1) DO  A[i]:= h
END;





GLOBAL OPERATOR := ( VAR A : CVECTOR; VAR B : RVECTOR );

VAR i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu  - bl ) THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  A[i]:= B[i+d]
END;




GLOBAL OPERATOR := ( VAR A : CMATRIX; VAR B : RMATRIX );

VAR i,d,
    al1,au1,bl1 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
     FOR i:= al1 TO au1 DO  A[i]:= B[i+d]
END;





{---------------------------------------------------------------------------}
{    1.1 Transferfunktionen fuer Vektoren                                   }
{---------------------------------------------------------------------------}



 
GLOBAL FUNCTION COMPL ( VAR A : RVECTOR ) : CVECTOR [LB(A)..UB(A)];

VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO  COMPL[i]:= A[i]
END;




GLOBAL FUNCTION COMPL ( VAR A, B : RVECTOR ) : CVECTOR [LB(A)..UB(A)];

VAR i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu  - bl ) THEN  m_MATH_ERROR ( 201 )
  ELSE
    FOR i:= al TO au DO  COMPL[i]:= COMPL( A[i], B[i+d] )
END;




GLOBAL FUNCTION RE ( VAR A : CVECTOR ) : RVECTOR [LB(A)..UB(A)];

VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO RE[i]:= A[i].RE
END;



   
GLOBAL FUNCTION IM ( VAR A : CVECTOR ) : RVECTOR [LB(A)..UB(A)];

VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO IM[i]:= A[i].IM
END;



   
{---------------------------------------------------------------------------}
{    1.2 Transferfunktionen fuer Matrizen                                   }
{---------------------------------------------------------------------------}




GLOBAL FUNCTION COMPL ( VAR A : RMATRIX ) : CMATRIX [LB(A,1)..UB(A,1),
                                                     LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  COMPL[z,s]:= A[z,s]
END;




GLOBAL FUNCTION COMPL ( VAR A, B : RMATRIX ) : CMATRIX [LB(A,1)..UB(A,1),
                                                        LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

  d1:= bl1 - al1;
  d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  COMPL[z,s]:= COMPL( A[z,s], B[z+d1,s+d2] )
END;




GLOBAL FUNCTION RE ( VAR A : CMATRIX ) : RMATRIX [LB(A,1)..UB(A,1),
                                                  LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  RE[z,s]:= A[z,s].RE
END;



   
GLOBAL FUNCTION IM ( VAR A : CMATRIX ) : RMATRIX [LB(A,1)..UB(A,1),
                                                  LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  IM[z,s]:= A[z,s].IM
END;




{---------------------------------------------------------------------------}
{ 2. Spezielle Funktionen                                                   }
{---------------------------------------------------------------------------}
{    2.1 Konjugation                                                        }
{---------------------------------------------------------------------------}




GLOBAL FUNCTION CONJ( VAR A : CVECTOR ) : CVECTOR[LB(A)..UB(A)];
 
VAR i : INTEGER;
 
BEGIN
  FOR i:= LB(A) TO UB(A) DO  CONJ[i]:= CONJ( A[i] )
END;




GLOBAL FUNCTION CONJ( VAR A : CMATRIX ) : CMATRIX[LB(A,1)..UB(A,1),
                                                  LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;
 
BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  CONJ[z,s]:= CONJ( A[z,s] )
END;




{---------------------------------------------------------------------------}
{    2.2 Skalarprodukt                                                      }
{---------------------------------------------------------------------------}



{  -------->     gibt's nicht mehr    <------------  }



{---------------------------------------------------------------------------}
{    2.3 Transponierte                                                      }
{---------------------------------------------------------------------------}




GLOBAL FUNCTION TRANSP ( VAR A : CMATRIX ) : CMATRIX [LB(A,2)..UB(A,2),
                                                      LB(A,1)..UB(A,1)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,2) TO UB(A,2) DO
  FOR s:= LB(A,1) TO UB(A,1) DO  TRANSP[z,s]:= A[s,z]
END;




{---------------------------------------------------------------------------}
{    2.4 Hermitesche Matrix                                                 }
{---------------------------------------------------------------------------}




GLOBAL FUNCTION HERM ( VAR A : CMATRIX ) : CMATRIX [LB(A,2)..UB(A,2),
                                                    LB(A,1)..UB(A,1)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,2) TO UB(A,2) DO
  FOR s:= LB(A,1) TO UB(A,1) DO  HERM[z,s]:= CONJ( A[s,z] )   
END;




{---------------------------------------------------------------------------}
{    2.5 Null - Arrays                                                      }
{---------------------------------------------------------------------------}
{        2.5.1 Null - Vektoren                                              }
{---------------------------------------------------------------------------}




GLOBAL FUNCTION NULL ( VAR A : CVECTOR ) : RVECTOR [LB(A)..UB(A)];

VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO NULL[i]:= 0.0
END;




{---------------------------------------------------------------------------}
{        2.5.2 Null - Matrizen                                              }
{---------------------------------------------------------------------------}





GLOBAL FUNCTION NULL ( VAR A : CMATRIX ) : RMATRIX [LB(A,1)..UB(A,1),
                                                    LB(A,2)..UB(A,2)];
VAR i : INTEGER;
    h : RVECTOR[LB(A,2)..UB(A,2)];

BEGIN
  FOR i:= LB(A,2) TO UB(A,2) DO     h[i]:= 0.0;
  FOR i:= LB(A,1) TO UB(A,1) DO  NULL[i]:= h;
END;




GLOBAL FUNCTION NULL ( VAR A,B : CMATRIX ) : RMATRIX [LB(A,1)..UB(A,1),
                                                      LB(B,2)..UB(B,2)];
VAR i : INTEGER;
    h : RVECTOR[LB(B,2)..UB(B,2)];

BEGIN
  FOR i:= LB(B,2) TO UB(B,2) DO     h[i]:= 0.0;
  FOR i:= LB(A,1) TO UB(A,1) DO  NULL[i]:= h;
END;






{---------------------------------------------------------------------------}
{    2.6 Einheitsmatrizen                                                   }
{---------------------------------------------------------------------------}





GLOBAL FUNCTION ID ( VAR A : CMATRIX ) : RMATRIX [LB(A,1)..UB(A,1),
                                                  LB(A,2)..UB(A,2)];
VAR i,bl1,bl2,bu1,bu2,d : INTEGER;
    h : RVECTOR[LB(A,2)..UB(A,2)];

BEGIN
  bl1:= LB(A,1);  bu1:= UB(A,1);
  bl2:= LB(A,2);  bu2:= UB(A,2);

  d:= bl2 - bl1;

  FOR i:= bl2 TO bu2 DO   h[i]:= 0.0;
  FOR i:= bl1 TO bu1 DO  ID[i]:= h;   { Ganze Matrix mit 0 fuellen. }

  IF ( bu2-bl2 ) < ( bu1-bl1 ) THEN  FOR i:= bl2 TO bu2 DO  ID[i-d,i]:= 1.0
                               ELSE  FOR i:= bl1 TO bu1 DO  ID[i,i+d]:= 1.0;
END;



GLOBAL FUNCTION ID ( VAR A,B : CMATRIX ) : RMATRIX [LB(A,1)..UB(A,1),
                                                    LB(B,2)..UB(B,2)];
VAR i,bl1,bl2,bu1,bu2,d : INTEGER;
    h : RVECTOR[LB(B,2)..UB(B,2)];

BEGIN
  bl1:= LB(A,1);  bu1:= UB(A,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

  d:= bl2 - bl1;

  FOR i:= bl2 TO bu2 DO   h[i]:= 0.0;
  FOR i:= bl1 TO bu1 DO  ID[i]:= h;   { Ganze Matrix mit 0 fuellen. }

  IF ( bu2-bl2 ) < ( bu1-bl1 ) THEN  FOR i:= bl2 TO bu2 DO  ID[i-d,i]:= 1.0
                               ELSE  FOR i:= bl1 TO bu1 DO  ID[i,i+d]:= 1.0;
END;




{---------------------------------------------------------------------------}
{ 3. Vergleiche                                                             }
{---------------------------------------------------------------------------}
{    3.1 Vergleiche RVECTOR, CVECTOR mit RVECTOR, CVECTOR                   }
{---------------------------------------------------------------------------}
{SEKTOR V33                                                                 }
{---------------------------------------------------------------------------}
{        3.1.1 Vergleiche RVECTOR mit RVECTOR                               }
{---------------------------------------------------------------------------}




{                    Sind bereits im Modul MV_ARI definiert.                }




{---------------------------------------------------------------------------}
{        3.1.2 Vergleiche RVECTOR mit CVECTOR                               }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR =  ( VAR A : RVECTOR; VAR B : CVECTOR ) EQVRVCR : BOOLEAN;

VAR gleich      : BOOLEAN;
    i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu  - bl ) THEN  m_MATH_ERROR ( 201 )  ELSE
  BEGIN
        i := al;
    gleich:= TRUE;
    WHILE  gleich  AND ( i <= au ) DO
      IF A[i] = B[i+d] THEN      i:= SUCC(i)
                       ELSE gleich:= FALSE;
    EQVRVCR:= gleich
  END
END;




GLOBAL OPERATOR <>  ( VAR A : RVECTOR; VAR B : CVECTOR ) NEVRVCR : BOOLEAN;

VAR ungleich    : BOOLEAN;
    i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu - bl ) THEN  m_MATH_ERROR ( 201 )  ELSE
  BEGIN
          i := al;
    ungleich:= FALSE;
    REPEAT
      IF A[i] <> B[i+d] THEN ungleich:= TRUE
                        ELSE        i:= SUCC(i);
    UNTIL  ungleich  OR ( i > au );
    NEVRVCR:= ungleich
  END
END;




GLOBAL OPERATOR <=  ( VAR A : RVECTOR; VAR B : CVECTOR ) LEVRVCR : BOOLEAN;

VAR kleinergleich : BOOLEAN;
    i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu  - bl ) THEN  m_MATH_ERROR ( 201 )  ELSE
  BEGIN
        i := al;
    kleinergleich:= TRUE;
    WHILE  kleinergleich  AND ( i <= au ) DO
      IF A[i] <= B[i+d] THEN             i:= SUCC(i)
                        ELSE kleinergleich:= FALSE;
    LEVRVCR:= kleinergleich
  END
END;




GLOBAL OPERATOR <  ( VAR A : RVECTOR; VAR B : CVECTOR ) LTVRVCR : BOOLEAN;

BEGIN
  LTVRVCR:= ( A <= B ) AND ( A <> B )
END;




GLOBAL OPERATOR >=  ( VAR A : RVECTOR; VAR B : CVECTOR ) GEVRVCR : BOOLEAN;

VAR groessergleich : BOOLEAN;
    i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu  - bl ) THEN  m_MATH_ERROR ( 201 )  ELSE
  BEGIN
        i := al;
    groessergleich:= TRUE;
    WHILE  groessergleich  AND ( i <= au ) DO
      IF A[i] >= B[i+d] THEN              i:= SUCC(i)
                        ELSE groessergleich:= FALSE;
    GEVRVCR:= groessergleich
  END
END;




GLOBAL OPERATOR >  ( VAR A : RVECTOR; VAR B : CVECTOR ) GTVRVCR : BOOLEAN;

BEGIN
  GTVRVCR:= ( A >= B ) AND ( A <> B )
END;




{---------------------------------------------------------------------------}
{        3.1.3 Vergleiche CVECTOR mit RVECTOR                               }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR =  ( VAR A : CVECTOR; VAR B : RVECTOR ) EQVCRVR : BOOLEAN;

VAR gleich      : BOOLEAN;
    i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu  - bl ) THEN  m_MATH_ERROR ( 201 )  ELSE
  BEGIN
        i := al;
    gleich:= TRUE;
    WHILE  gleich  AND ( i <= au ) DO
      IF A[i] = B[i+d] THEN      i:= SUCC(i)
                       ELSE gleich:= FALSE;
    EQVCRVR:= gleich
  END
END;




GLOBAL OPERATOR <>  ( VAR A : CVECTOR; VAR B : RVECTOR ) NEVCRVR : BOOLEAN;

VAR ungleich    : BOOLEAN;
    i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu - bl ) THEN  m_MATH_ERROR ( 201 )  ELSE
  BEGIN
          i := al;
    ungleich:= FALSE;
    REPEAT
      IF A[i] <> B[i+d] THEN ungleich:= TRUE
                        ELSE        i:= SUCC(i);
    UNTIL  ungleich  OR ( i > au );
    NEVCRVR:= ungleich
  END
END;




GLOBAL OPERATOR <=  ( VAR A : CVECTOR; VAR B : RVECTOR ) LEVCRVR : BOOLEAN;

VAR kleinergleich : BOOLEAN;
    i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu  - bl ) THEN  m_MATH_ERROR ( 201 )  ELSE
  BEGIN
        i := al;
    kleinergleich:= TRUE;
    WHILE  kleinergleich  AND ( i <= au ) DO
      IF A[i] <= B[i+d] THEN             i:= SUCC(i)
                        ELSE kleinergleich:= FALSE;
    LEVCRVR:= kleinergleich
  END
END;




GLOBAL OPERATOR <  ( VAR A : CVECTOR; VAR B : RVECTOR ) LTVCRVR : BOOLEAN;

BEGIN
  LTVCRVR:= ( A <= B ) AND ( A <> B )
END;




GLOBAL OPERATOR >=  ( VAR A : CVECTOR; VAR B : RVECTOR ) GEVCRVR : BOOLEAN;

VAR groessergleich : BOOLEAN;
    i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu  - bl ) THEN  m_MATH_ERROR ( 201 )  ELSE
  BEGIN
        i := al;
    groessergleich:= TRUE;
    WHILE  groessergleich  AND ( i <= au ) DO
      IF A[i] >= B[i+d] THEN              i:= SUCC(i)
                        ELSE groessergleich:= FALSE;
    GEVCRVR:= groessergleich
  END
END;




GLOBAL OPERATOR >  ( VAR A : CVECTOR; VAR B : RVECTOR ) GTVCRVR : BOOLEAN;

BEGIN
  GTVCRVR:= ( A >= B ) AND ( A <> B )
END;




{---------------------------------------------------------------------------}
{        3.1.4 Vergleiche CVECTOR mit CVECTOR                               }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR =  ( VAR A, B : CVECTOR ) EQVCRVCR : BOOLEAN;

VAR gleich      : BOOLEAN;
    i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu  - bl ) THEN  m_MATH_ERROR ( 201 )  ELSE
  BEGIN
        i := al;
    gleich:= TRUE;
    WHILE  gleich  AND ( i <= au ) DO
      IF A[i] = B[i+d] THEN      i:= SUCC(i)
                       ELSE gleich:= FALSE;
    EQVCRVCR:= gleich
  END
END;




GLOBAL OPERATOR <>  ( VAR A, B : CVECTOR ) NEVCRVCR : BOOLEAN;

VAR ungleich    : BOOLEAN;
    i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu - bl ) THEN  m_MATH_ERROR ( 201 )  ELSE
  BEGIN
          i := al;
    ungleich:= FALSE;
    REPEAT
      IF A[i] <> B[i+d] THEN ungleich:= TRUE
                        ELSE        i:= SUCC(i);
    UNTIL  ungleich  OR ( i > au );
    NEVCRVCR:= ungleich
  END
END;




GLOBAL OPERATOR <=  ( VAR A, B : CVECTOR ) LEVCRVCR : BOOLEAN;

VAR kleinergleich : BOOLEAN;
    i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu  - bl ) THEN  m_MATH_ERROR ( 201 )  ELSE
  BEGIN
        i := al;
    kleinergleich:= TRUE;
    WHILE  kleinergleich  AND ( i <= au ) DO
      IF A[i] <= B[i+d] THEN             i:= SUCC(i)
                        ELSE kleinergleich:= FALSE;
    LEVCRVCR:= kleinergleich
  END
END;




GLOBAL OPERATOR <  ( VAR A, B : CVECTOR ) LTVCRVCR : BOOLEAN;

BEGIN
  LTVCRVCR:= ( A <= B ) AND ( A <> B )
END;




GLOBAL OPERATOR >=  ( VAR A, B : CVECTOR ) GEVCRVCR : BOOLEAN;

VAR groessergleich : BOOLEAN;
    i,d,
    al,au,bl,bu : INTEGER;

BEGIN
  al:= LB(A); au:= UB(A);
  bl:= LB(B); bu:= UB(B);

  d:= bl - al;

  IF ( au - al ) <> ( bu  - bl ) THEN  m_MATH_ERROR ( 201 )  ELSE
  BEGIN
        i := al;
    groessergleich:= TRUE;
    WHILE  groessergleich  AND ( i <= au ) DO
      IF A[i] >= B[i+d] THEN              i:= SUCC(i)
                        ELSE groessergleich:= FALSE;
    GEVCRVCR:= groessergleich
  END
END;




GLOBAL OPERATOR >  ( VAR A, B : CVECTOR ) GTVCRVCR : BOOLEAN;

BEGIN
  GTVCRVCR:= ( A >= B ) AND ( A <> B )
END;




{---------------------------------------------------------------------------}
{    3.2 Vergleiche RMATRIX, CMATRIX mit RMATRIX, CMATRIX                   }
{---------------------------------------------------------------------------}
{SEKTOR V55                                                                 }
{---------------------------------------------------------------------------}
{        3.2.1 Vergleiche RMATRIX mit RMATRIX                               }
{---------------------------------------------------------------------------}




{                    Sind bereits im Modul MV_ARI definiert.                }




{---------------------------------------------------------------------------}
{        3.2.2 Vergleiche RMATRIX mit CMATRIX                               }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR =  ( VAR A : RMATRIX; VAR B : CMATRIX ) EQMRMCR : BOOLEAN;

VAR gleich      : BOOLEAN;
    i,d,
    al1,au1,bl1 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
  BEGIN
        i := al1;
    gleich:= TRUE;
    WHILE  gleich  AND ( i <= au1 ) DO
      IF A[i] = B[i+d] THEN       i:= SUCC(i)
                       ELSE  gleich:= FALSE;
    EQMRMCR:= gleich
  END
END;




GLOBAL OPERATOR <> ( VAR A : RMATRIX; VAR B : CMATRIX ) NEMRMCR : BOOLEAN;

VAR ungleich    : BOOLEAN;
    i,d,
    al1,au1,bl1 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);   

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
  BEGIN
           i:= al1;
    ungleich:= FALSE;
    REPEAT
      IF A[i] <> B[i+d] THEN ungleich:= TRUE
                        ELSE        i:= SUCC(i);
    UNTIL  ungleich OR ( i > au1 );
    NEMRMCR:= ungleich
  END
END;




GLOBAL OPERATOR <=  ( VAR A : RMATRIX; VAR B : CMATRIX ) LEMRMCR : BOOLEAN;

VAR kleinergleich : BOOLEAN;
    i,d,
    al1,au1,bl1   : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);   

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
  BEGIN
               i := al1;
    kleinergleich:= TRUE;
    WHILE  kleinergleich AND ( i <= au1 ) DO 
      IF A[i] <= B[i+d] THEN             i:= SUCC(i)
                        ELSE kleinergleich:= false;
    LEMRMCR:= kleinergleich
  END
END;




GLOBAL OPERATOR <  ( VAR A : RMATRIX; VAR B : CMATRIX ) LTMRMCR : BOOLEAN;

BEGIN
  LTMRMCR:= ( A <= B ) AND ( A <> B )
END;




GLOBAL OPERATOR >=  ( VAR A : RMATRIX; VAR B : CMATRIX ) GEMRMCR : BOOLEAN;

VAR groessergleich : BOOLEAN;
    i,d,
    al1,au1,bl1   : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);   

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
  BEGIN
                i := al1;
    groessergleich:= TRUE;
    WHILE  groessergleich AND ( i <= au1 ) DO 
      IF A[i] >= B[i+d]  THEN              i:= SUCC(i)
                         ELSE groessergleich:= false;
    GEMRMCR:= groessergleich
  END
END;




GLOBAL OPERATOR >  ( VAR A : RMATRIX; VAR B : CMATRIX ) GTMRMCR : BOOLEAN;

BEGIN
  GTMRMCR:= ( A >= B ) AND ( A <> B )
END;




{---------------------------------------------------------------------------}
{        3.2.3 Vergleiche CMATRIX mit RMATRIX                               }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR =  ( VAR A : CMATRIX; VAR B : RMATRIX ) EQMCRMR : BOOLEAN;

VAR gleich      : BOOLEAN;
    i,d,
    al1,au1,bl1 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
  BEGIN
        i := al1;
    gleich:= TRUE;
    WHILE  gleich  AND ( i <= au1 ) DO
      IF A[i] = B[i+d] THEN       i:= SUCC(i)
                       ELSE  gleich:= FALSE;
    EQMCRMR:= gleich
  END
END;




GLOBAL OPERATOR <> ( VAR A : CMATRIX; VAR B : RMATRIX ) NEMCRMR : BOOLEAN;

VAR ungleich    : BOOLEAN;
    i,d,
    al1,au1,bl1 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);   

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
  BEGIN
           i:= al1;
    ungleich:= FALSE;
    REPEAT
      IF A[i] <> B[i+d] THEN ungleich:= TRUE
                        ELSE        i:= SUCC(i);
    UNTIL  ungleich OR ( i > au1 );
    NEMCRMR:= ungleich
  END
END;




GLOBAL OPERATOR <=  ( VAR A : CMATRIX; VAR B : RMATRIX ) LEMCRMR : BOOLEAN;

VAR kleinergleich : BOOLEAN;
    i,d,
    al1,au1,bl1   : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
  BEGIN
               i := al1;
    kleinergleich:= TRUE;
    WHILE  kleinergleich AND ( i <= au1 ) DO 
      IF A[i] <= B[i+d] THEN             i:= SUCC(i)
                        ELSE kleinergleich:= false;
    LEMCRMR:= kleinergleich
  END
END;




GLOBAL OPERATOR <  ( VAR A : CMATRIX; VAR B : RMATRIX ) LTMCRMR : BOOLEAN;

BEGIN
  LTMCRMR:= ( A <= B ) AND ( A <> B )
END;




GLOBAL OPERATOR >=  ( VAR A : CMATRIX; VAR B : RMATRIX ) GEMCRMR : BOOLEAN;

VAR groessergleich : BOOLEAN;
    i,d,
    al1,au1,bl1   : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
  BEGIN
                i := al1;
    groessergleich:= TRUE;
    WHILE  groessergleich AND ( i <= au1 ) DO 
      IF A[i] >= B[i+d]  THEN              i:= SUCC(i)
                         ELSE groessergleich:= false;
    GEMCRMR:= groessergleich
  END
END;




GLOBAL OPERATOR >  ( VAR A : CMATRIX; VAR B : RMATRIX ) GTMCRMR : BOOLEAN;

BEGIN
  GTMCRMR:= ( A >= B ) AND ( A <> B )
END;




{---------------------------------------------------------------------------}
{        3.2.4 Vergleiche CMATRIX mit CMATRIX                               }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR =  ( VAR A, B : CMATRIX ) EQMCRMCR : BOOLEAN;

VAR gleich      : BOOLEAN;
    i,d,
    al1,au1,bl1 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
  BEGIN
        i := al1;
    gleich:= TRUE;
    WHILE  gleich  AND ( i <= au1 ) DO
      IF A[i] = B[i+d] THEN       i:= SUCC(i)
                       ELSE  gleich:= FALSE;
    EQMCRMCR:= gleich
  END
END;



 
GLOBAL OPERATOR <> ( VAR A, B : CMATRIX ) NEMCRMCR : BOOLEAN;

VAR ungleich    : BOOLEAN;
    i,d,
    al1,au1,bl1 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
  BEGIN
           i:= al1;
    ungleich:= FALSE;
    REPEAT
      IF A[i] <> B[i+d] THEN ungleich:= TRUE
                        ELSE        i:= SUCC(i);
    UNTIL  ungleich OR ( i > au1 );
    NEMCRMCR:= ungleich
  END
END;




GLOBAL OPERATOR <=  ( VAR A, B : CMATRIX ) LEMCRMCR : BOOLEAN;

VAR kleinergleich : BOOLEAN;
    i,d,
    al1,au1,bl1   : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
  BEGIN
               i := al1;
    kleinergleich:= TRUE;
    WHILE  kleinergleich AND ( i <= au1 ) DO 
      IF A[i] <= B[i+d] THEN             i:= SUCC(i)
                        ELSE kleinergleich:= false;
    LEMCRMCR:= kleinergleich
  END
END;




GLOBAL OPERATOR <  ( VAR A, B : CMATRIX ) LTMCRMCR : BOOLEAN;

BEGIN
  LTMCRMCR:= ( A <= B ) AND ( A <> B )
END;




GLOBAL OPERATOR >=  ( VAR A, B : CMATRIX ) GEMCRMCR : BOOLEAN;

VAR groessergleich : BOOLEAN;
    i,d,
    al1,au1,bl1   : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  bl1:= LB(B,1);

  d:= bl1 - al1;

  IF (    au1  -  al1    <> UB(B,1) -  bl1    ) OR
     ( UB(A,2) - LB(A,2) <> UB(B,2) - LB(B,2) )   THEN m_MATH_ERROR( 202 )
  ELSE
  BEGIN
                i := al1;
    groessergleich:= TRUE;
    WHILE  groessergleich AND ( i <= au1 ) DO 
      IF A[i] >= B[i+d]  THEN              i:= SUCC(i)
                         ELSE groessergleich:= false;
    GEMCRMCR:= groessergleich
  END
END;




GLOBAL OPERATOR >  ( VAR A, B : CMATRIX ) GTMCRMCR : BOOLEAN;

BEGIN
  GTMCRMCR:= ( A >= B ) AND ( A <> B )
END;





{---------------------------------------------------------------------------}
{  4. Arithmetische Operatoren ( + - * / ) und Verbandsoperatoren           }   
{---------------------------------------------------------------------------}
{     4.1 Monadische Operatoren                                             }
{---------------------------------------------------------------------------}
{         4.1.1 Monadische Operatoren fuer Vektoren                         }
{---------------------------------------------------------------------------}
{SEKTOR A03                                                                 }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR + ( VAR A : CVECTOR ) PLUSVCR : CVECTOR [LB(A)..UB(A)];

BEGIN
  PLUSVCR:= A
END;




GLOBAL OPERATOR - ( VAR A : CVECTOR ) MINUSVCR : CVECTOR [LB(A)..UB(A)];

VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO MINUSVCR[i]:= -A[i]
END;




{---------------------------------------------------------------------------}
{         4.1.2 Monadische Operatoren fuer Matrizen                         }
{---------------------------------------------------------------------------}
{SEKTOR A05                                                                 }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR + ( VAR A : CMATRIX ) PLUSMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                         LB(A,2)..UB(A,2)];

BEGIN
  PLUSMCR:= A
END;



   
GLOBAL OPERATOR - ( VAR A : CMATRIX ) MINUSMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                          LB(A,2)..UB(A,2)];

VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  MINUSMCR[z,s]:= -A[z,s]
END;




{---------------------------------------------------------------------------}
{     4.2 Operatoren fuer REAL, COMPLEX mit RVECTOR, CVECTOR                }
{---------------------------------------------------------------------------}
{SEKTOR A13                                                                 }
{---------------------------------------------------------------------------}
{         4.2.1 Operatoren fuer REAL mit RVECTOR                            }
{---------------------------------------------------------------------------}




{                    Sind bereits im Modul MV_ARI definiert.                }




{---------------------------------------------------------------------------}
{         4.2.2 Operatoren fuer REAL mit CVECTOR                            }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( A : REAL; VAR B : CVECTOR )
                                       MULRVCR : CVECTOR [LB(B)..UB(B)];
   
VAR i : INTEGER;

BEGIN
 FOR i:= LB(B) TO UB(B) DO  MULRVCR[i]:= A * B[i]
END;




GLOBAL OPERATOR *< ( A : REAL; VAR B : CVECTOR )
                                    MULDOWNRVCR : CVECTOR [LB(B)..UB(B)];
   
VAR i : INTEGER;

BEGIN
 FOR i:= LB(B) TO UB(B) DO  MULDOWNRVCR[i]:= A *< B[i]
END;




GLOBAL OPERATOR *> ( A : REAL; VAR B : CVECTOR )
                                      MULUPRVCR : CVECTOR [LB(B)..UB(B)];
   
VAR i : INTEGER;

BEGIN
 FOR i:= LB(B) TO UB(B) DO  MULUPRVCR[i]:= A *> B[i]
END;




{---------------------------------------------------------------------------}
{         4.2.3 Operatoren fuer COMPLEX mit RVECTOR                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( VAR A : COMPLEX; VAR B : RVECTOR )
                                             MULCRVR : CVECTOR [LB(B)..UB(B)];

VAR i : INTEGER;

BEGIN
  FOR i:= LB(B) TO UB(B) DO  MULCRVR[i]:= A * B[i]   
END;




GLOBAL OPERATOR *< ( VAR A : COMPLEX; VAR B : RVECTOR )
                                          MULDOWNCRVR : CVECTOR [LB(B)..UB(B)];

VAR i : INTEGER;

BEGIN
  FOR i:= LB(B) TO UB(B) DO  MULDOWNCRVR[i]:= A *< B[i]   
END;




GLOBAL OPERATOR *> ( VAR A : COMPLEX; VAR B : RVECTOR )
                                            MULUPCRVR : CVECTOR [LB(B)..UB(B)];

VAR i : INTEGER;

BEGIN
  FOR i:= LB(B) TO UB(B) DO  MULUPCRVR[i]:= A *> B[i]   
END;




{---------------------------------------------------------------------------}
{         4.2.4 Operatoren fuer COMPLEX mit CVECTOR                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( VAR A : COMPLEX; VAR B : CVECTOR )
                                            MULCRVCR : CVECTOR [LB(B)..UB(B)];

VAR i : INTEGER;

BEGIN
  FOR i:= LB(B) TO UB(B) DO  MULCRVCR[i]:= A * B[i]   
END;




GLOBAL OPERATOR *< ( VAR A : COMPLEX; VAR B : CVECTOR )
                                         MULDOWNCRVCR : CVECTOR [LB(B)..UB(B)];

VAR i : INTEGER;

BEGIN
  FOR i:= LB(B) TO UB(B) DO  MULDOWNCRVCR[i]:= A *< B[i]   
END;




GLOBAL OPERATOR *> ( VAR A : COMPLEX; VAR B : CVECTOR )
                                           MULUPCRVCR : CVECTOR [LB(B)..UB(B)];

VAR i : INTEGER;

BEGIN
  FOR i:= LB(B) TO UB(B) DO  MULUPCRVCR[i]:= A *> B[i]   
END;




{---------------------------------------------------------------------------}
{     4.3 Operatoren fuer REAL, COMPLEX mit RMATRIX, CMATRIX                }
{---------------------------------------------------------------------------}
{SEKTOR A15                                                                 }
{---------------------------------------------------------------------------}
{         4.3.1 Operatoren fuer REAL mit RMATRIX                            }
{---------------------------------------------------------------------------}




{                    Sind bereits im Modul MV_ARI definiert.                }




{---------------------------------------------------------------------------}
{         4.3.2 Operatoren fuer REAL mit CMATRIX                            }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( A : REAL; VAR B : CMATRIX )
                                       MULRMCR : CMATRIX [LB(B,1)..UB(B,1),
                                                          LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(B,1) TO UB(B,1) DO
  FOR s:= LB(B,2) TO UB(B,2) DO  MULRMCR[z,s]:= A * B[z,s]
END;




GLOBAL OPERATOR *< ( A : REAL; VAR B : CMATRIX )
                                    MULDOWNRMCR : CMATRIX [LB(B,1)..UB(B,1),
                                                           LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(B,1) TO UB(B,1) DO
  FOR s:= LB(B,2) TO UB(B,2) DO  MULDOWNRMCR[z,s]:= A *< B[z,s]
END;




GLOBAL OPERATOR *> ( A : REAL; VAR B : CMATRIX )
                                      MULUPRMCR : CMATRIX [LB(B,1)..UB(B,1),
                                                           LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(B,1) TO UB(B,1) DO
  FOR s:= LB(B,2) TO UB(B,2) DO  MULUPRMCR[z,s]:= A *> B[z,s]
END;




{---------------------------------------------------------------------------}
{         4.3.3 Operatoren fuer COMPLEX mit RMATRIX                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( VAR A : COMPLEX; VAR B : RMATRIX )
                                          MULCRMR : CMATRIX [LB(B,1)..UB(B,1),
                                                             LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(B,1) TO UB(B,1) DO
  FOR s:= LB(B,2) TO UB(B,2) DO  MULCRMR[z,s]:= A * B[z,s]
END;




GLOBAL OPERATOR *< ( VAR A : COMPLEX; VAR B : RMATRIX )
                                      MULDOWNCRMR : CMATRIX [LB(B,1)..UB(B,1),
                                                             LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(B,1) TO UB(B,1) DO
  FOR s:= LB(B,2) TO UB(B,2) DO  MULDOWNCRMR[z,s]:= A *< B[z,s]
END;




GLOBAL OPERATOR *> ( VAR A : COMPLEX; VAR B : RMATRIX )
                                        MULUPCRMR : CMATRIX [LB(B,1)..UB(B,1),
                                                             LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(B,1) TO UB(B,1) DO
  FOR s:= LB(B,2) TO UB(B,2) DO  MULUPCRMR[z,s]:= A *> B[z,s]
END;




{---------------------------------------------------------------------------}
{         4.3.4 Operatoren fuer COMPLEX mit CMATRIX                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( VAR A : COMPLEX; VAR B : CMATRIX )
                                         MULCRMCR : CMATRIX [LB(B,1)..UB(B,1),
                                                             LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(B,1) TO UB(B,1) DO
  FOR s:= LB(B,2) TO UB(B,2) DO  MULCRMCR[z,s]:= A * B[z,s]
END;


 

GLOBAL OPERATOR *< ( VAR A : COMPLEX; VAR B : CMATRIX )
                                     MULDOWNCRMCR : CMATRIX [LB(B,1)..UB(B,1),
                                                             LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(B,1) TO UB(B,1) DO
  FOR s:= LB(B,2) TO UB(B,2) DO  MULDOWNCRMCR[z,s]:= A *< B[z,s]
END;




GLOBAL OPERATOR *> ( VAR A : COMPLEX; VAR B : CMATRIX )
                                       MULUPCRMCR : CMATRIX [LB(B,1)..UB(B,1),
                                                             LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(B,1) TO UB(B,1) DO
  FOR s:= LB(B,2) TO UB(B,2) DO  MULUPCRMCR[z,s]:= A *> B[z,s]
END;




{---------------------------------------------------------------------------}
{     4.4 Operatoren fuer RVECTOR, CVECTOR mit REAL, COMPLEX                }
{---------------------------------------------------------------------------}
{SEKTOR A31                                                                 }
{---------------------------------------------------------------------------}
{         4.4.1 Operatoren fuer RVECTOR mit REAL                            }
{---------------------------------------------------------------------------}




{                    Sind bereits im Modul MV_ARI definiert.                }




{---------------------------------------------------------------------------}
{         4.4.2 Operatoren fuer RVECTOR mit COMPLEX                         }
{---------------------------------------------------------------------------}



GLOBAL OPERATOR * ( VAR A : RVECTOR; VAR B : COMPLEX )
                                             MULVRCR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO  MULVRCR[i]:= A[i] * B  
END;




GLOBAL OPERATOR *< ( VAR A : RVECTOR; VAR B : COMPLEX )
                                         MULDOWNVRCR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO  MULDOWNVRCR[i]:= A[i] *< B   
END;




GLOBAL OPERATOR *> ( VAR A : RVECTOR; VAR B : COMPLEX )
                                           MULUPVRCR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO  MULUPVRCR[i]:= A[i] *> B   
END;




GLOBAL OPERATOR / ( VAR A : RVECTOR; VAR B : COMPLEX )
                                             DIVVRCR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
 FOR i:= LB(A) TO UB(A) DO  DIVVRCR[i]:= A[i] / B
END;




GLOBAL OPERATOR /< ( VAR A : RVECTOR; VAR B : COMPLEX )
                                         DIVDOWNVRCR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
 FOR i:= LB(A) TO UB(A) DO  DIVDOWNVRCR[i]:= A[i] /< B
END;




GLOBAL OPERATOR /> ( VAR A : RVECTOR; VAR B : COMPLEX )
                                           DIVUPVRCR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
 FOR i:= LB(A) TO UB(A) DO  DIVUPVRCR[i]:= A[i] /> B
END;




{---------------------------------------------------------------------------}
{         4.4.3 Operatoren fuer CVECTOR mit REAL                            }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( VAR A : CVECTOR; B : REAL )
                                        MULVCRR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
 FOR i:= LB(A) TO UB(A) DO  MULVCRR[i]:= A[i] * B
END;




GLOBAL OPERATOR *< ( VAR A : CVECTOR; B : REAL )
                                     MULDOWNVCRR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
 FOR i:= LB(A) TO UB(A) DO  MULDOWNVCRR[i]:= A[i] *< B
END;




GLOBAL OPERATOR *> ( VAR A : CVECTOR; B : REAL )
                                       MULUPVCRR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
 FOR i:= LB(A) TO UB(A) DO  MULUPVCRR[i]:= A[i] *> B
END;




GLOBAL OPERATOR / ( VAR A : CVECTOR; B : REAL )
                                        DIVVCRR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
 FOR i:= LB(A) TO UB(A) DO  DIVVCRR[i]:= A[i] / B
END;




GLOBAL OPERATOR /< ( VAR A : CVECTOR; B : REAL )
                                     DIVDOWNVCRR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
 FOR i:= LB(A) TO UB(A) DO  DIVDOWNVCRR[i]:= A[i] /< B
END;




GLOBAL OPERATOR /> ( VAR A : CVECTOR; B : REAL )
                                       DIVUPVCRR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
 FOR i:= LB(A) TO UB(A) DO  DIVUPVCRR[i]:= A[i] /> B
END;




{---------------------------------------------------------------------------}
{         4.4.4 Operatoren fuer CVECTOR mit COMPLEX                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( VAR A : CVECTOR; VAR B : COMPLEX )
                                              MULVCRCR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO  MULVCRCR[i]:= A[i] * B   
END;




GLOBAL OPERATOR *< ( VAR A : CVECTOR; VAR B : COMPLEX )
                                          MULDOWNVCRCR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO  MULDOWNVCRCR[i]:= A[i]  *< B   
END;




GLOBAL OPERATOR *> ( VAR A : CVECTOR; VAR B : COMPLEX )
                                            MULUPVCRCR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO  MULUPVCRCR[i]:= A[i] *> B   
END;




GLOBAL OPERATOR / ( VAR A : CVECTOR; VAR B : COMPLEX )
                                              DIVVCRCR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO  DIVVCRCR[i]:= A[i] / B
END;




GLOBAL OPERATOR /< ( VAR A : CVECTOR; VAR B : COMPLEX )
                                          DIVDOWNVCRCR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO  DIVDOWNVCRCR[i]:= A[i] /< B
END;




GLOBAL OPERATOR /> ( VAR A : CVECTOR; VAR B : COMPLEX )
                                            DIVUPVCRCR : CVECTOR [LB(A)..UB(A)];
VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO  DIVUPVCRCR[i]:= A[i] /> B
END;




{---------------------------------------------------------------------------}
{     4.5 Operatoren fuer RVECTOR, CVECTOR mit RVECTOR, CVECTOR             }
{---------------------------------------------------------------------------}
{SEKTOR A33                                                                 }
{---------------------------------------------------------------------------}
{         4.5.1 Operatoren fuer RVECTOR mit RVECTOR                         }
{---------------------------------------------------------------------------}




{                    Sind bereits im Modul MV_ARI definiert.                }




{---------------------------------------------------------------------------}
{         4.5.2 Operatoren fuer RVECTOR mit CVECTOR                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR + ( VAR A : RVECTOR; VAR B : CVECTOR )
                                             ADDVRVCR : CVECTOR [LB(A)..UB(A)];
VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  ADDVRVCR[i]:= A[i] + B[i+d]
END;




GLOBAL OPERATOR +< ( VAR A : RVECTOR; VAR B : CVECTOR )
                                         ADDDOWNVRVCR : CVECTOR [LB(A)..UB(A)];
VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  ADDDOWNVRVCR[i]:= A[i] +< B[i+d]
END;




GLOBAL OPERATOR +> ( VAR A : RVECTOR; VAR B : CVECTOR )
                                           ADDUPVRVCR : CVECTOR [LB(A)..UB(A)];
VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  ADDUPVRVCR[i]:= A[i] +> B[i+d]
END;




GLOBAL OPERATOR - ( VAR A : RVECTOR; VAR B : CVECTOR )
                                             SUBVRVCR : CVECTOR [LB(A)..UB(A)];
VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  SUBVRVCR[i]:= A[i] - B[i+d]
END;






GLOBAL OPERATOR -< ( VAR A : RVECTOR; VAR B : CVECTOR )
                                         SUBDOWNVRVCR : CVECTOR [LB(A)..UB(A)];
VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  SUBDOWNVRVCR[i]:= A[i] -< B[i+d]
END;




GLOBAL OPERATOR -> ( VAR A : RVECTOR; VAR B : CVECTOR )
                                           SUBUPVRVCR : CVECTOR [LB(A)..UB(A)];
VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  SUBUPVRVCR[i]:= A[i] -> B[i+d]
END;




GLOBAL OPERATOR * ( VAR A : RVECTOR; VAR B : CVECTOR ) MULVRVCR : COMPLEX;

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
    MULVRVCR:= #*( FOR i:= al TO au SUM ( COMPL(A[i]) * B[i+d] ) )
END;




GLOBAL OPERATOR *< ( VAR A : RVECTOR; VAR B : CVECTOR ) MULDOWNVRVCR : COMPLEX;

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
    MULDOWNVRVCR:= #<( FOR i:= al TO au SUM ( COMPL(A[i]) * B[i+d] ) )
END;




GLOBAL OPERATOR *> ( A : RVECTOR; B : CVECTOR ) MULUPVRVCR : COMPLEX;

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
    MULUPVRVCR:= #>( FOR i:= al TO au SUM ( COMPL(A[i]) * B[i+d] ) )
END;




{---------------------------------------------------------------------------}
{         4.5.3 Operatoren fuer CVECTOR mit RVECTOR                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR + ( VAR A : CVECTOR; VAR B: RVECTOR )
                                             ADDVCRVR : CVECTOR [LB(A)..UB(A)];
VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  ADDVCRVR[i]:= A[i] + B[i+d]
END;



GLOBAL OPERATOR +< ( VAR A : CVECTOR; VAR B : RVECTOR )
                                         ADDDOWNVCRVR : CVECTOR [LB(A)..UB(A)];
VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  ADDDOWNVCRVR[i]:= A[i] +< B[i+d]
END;




GLOBAL OPERATOR +> ( VAR A : CVECTOR; VAR B : RVECTOR )
                                           ADDUPVCRVR : CVECTOR [LB(A)..UB(A)];
VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  ADDUPVCRVR[i]:= A[i] +> B[i+d]
END;




GLOBAL OPERATOR - ( VAR A : CVECTOR; VAR B : RVECTOR )
                                             SUBVCRVR : CVECTOR [LB(A)..UB(A)];
VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  SUBVCRVR[i]:= A[i] - B[i+d]
END;




GLOBAL OPERATOR -< ( VAR A : CVECTOR; VAR B : RVECTOR )
                                         SUBDOWNVCRVR : CVECTOR [LB(A)..UB(A)];
VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  SUBDOWNVCRVR[i]:= A[i] -< B[i+d]
END;




GLOBAL OPERATOR -> ( VAR A : CVECTOR; VAR B : RVECTOR )
                                           SUBUPVCRVR : CVECTOR [LB(A)..UB(A)];
VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  SUBUPVCRVR[i]:= A[i] -> B[i+d]
END;




GLOBAL OPERATOR * ( VAR A : CVECTOR; VAR B : RVECTOR ) MULVCRVR : COMPLEX;

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
    MULVCRVR:= #*( FOR i:= al TO au SUM ( A[i] * COMPL(B[i+d]) ) )
END;




GLOBAL OPERATOR *< ( VAR A : CVECTOR; VAR B : RVECTOR ) MULDOWNVCRVR : COMPLEX;

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
    MULDOWNVCRVR:= #<( FOR i:= al TO au SUM ( A[i] * COMPL(B[i+d]) ) )
END;




GLOBAL OPERATOR *> ( VAR A : CVECTOR; VAR B : RVECTOR ) MULUPVCRVR : COMPLEX;

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
    MULUPVCRVR:= #>( FOR i:= al TO au SUM ( A[i] * COMPL(B[i+d]) ) )
END;




{---------------------------------------------------------------------------}
{         4.5.4 Operatoren fuer CVECTOR mit CVECTOR                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR + ( VAR A, B : CVECTOR ) ADDVCRVCR : CVECTOR [LB(A)..UB(A)];

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  ADDVCRVCR[i]:= A[i] + B[i+d]
END;




GLOBAL OPERATOR +< ( VAR A, B : CVECTOR ) ADDDOWNVCRVCR : CVECTOR [LB(A)..UB(A)];

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  ADDDOWNVCRVCR[i]:= A[i] +< B[i+d]
END;




GLOBAL OPERATOR +> ( VAR A, B : CVECTOR ) ADDUPVCRVCR : CVECTOR [LB(A)..UB(A)];

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  ADDUPVCRVCR[i]:= A[i] +> B[i+d]
END;




GLOBAL OPERATOR - ( VAR A, B : CVECTOR ) SUBVCRVCR : CVECTOR [LB(A)..UB(A)];

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  SUBVCRVCR[i]:= A[i] - B[i+d]
END;




GLOBAL OPERATOR -< ( VAR A, B : CVECTOR ) SUBDOWNVCRVCR : CVECTOR [LB(A)..UB(A)];

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  SUBDOWNVCRVCR[i]:= A[i] -< B[i+d]
END;




GLOBAL OPERATOR -> ( VAR A, B : CVECTOR ) SUBUPVCRVCR : CVECTOR [LB(A)..UB(A)];

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
     FOR i:= al TO au DO  SUBUPVCRVCR[i]:= A[i] -> B[i+d]
END;




GLOBAL OPERATOR * ( VAR A, B : CVECTOR ) MULVCRVCR : COMPLEX;

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
    MULVCRVCR:= #*( FOR i:= al TO au SUM ( A[i] * B[i+d] ) )
END;




GLOBAL OPERATOR *< ( VAR A, B : CVECTOR ) MULDOWNVCRVCR : COMPLEX;

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
    MULDOWNVCRVCR:= #<( FOR i:= al TO au SUM ( A[i] * B[i+d] ) )
END;




GLOBAL OPERATOR *> ( VAR A, B : CVECTOR ) MULUPVCRVCR : COMPLEX;

VAR i, al,bl,au, d : INTEGER;

BEGIN
  al:= LB(A);  au:= UB(A);
  bl:= LB(B);

   d:= bl - al;

  IF au - al  <> UB(B) - bl THEN  m_MATH_ERROR ( 201 )
  ELSE
    MULUPVCRVCR:= #>( FOR i:= al TO au SUM ( A[i] * B[i+d] ) )
END;




{---------------------------------------------------------------------------}
{     4.6 Operatoren fuer RMATRIX, CMATRIX mit REAL, COMPLEX                }
{---------------------------------------------------------------------------}
{SEKTOR A51                                                                 }
{---------------------------------------------------------------------------}
{         4.6.1 Operatoren fuer RMATRIX mit REAL                            }
{---------------------------------------------------------------------------}




{                    Sind bereits im Modul MV_ARI definiert.                }




{---------------------------------------------------------------------------}
{         4.6.2 Operatoren fuer RMATRIX mit COMPLEX                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( VAR A : RMATRIX; VAR B : COMPLEX )
                                          MULMRCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  MULMRCR[z,s]:= A[z,s] * B
END;




GLOBAL OPERATOR *< ( VAR A : RMATRIX; VAR B : COMPLEX )
                                      MULDOWNMRCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  MULDOWNMRCR[z,s]:= A[z,s] *< B
END;




GLOBAL OPERATOR *> ( VAR A : RMATRIX; VAR B : COMPLEX )
                                        MULUPMRCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  MULUPMRCR[z,s]:= A[z,s] *> B
END;




GLOBAL OPERATOR / ( VAR A : RMATRIX; VAR B : COMPLEX )
                                          DIVMRCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  DIVMRCR[z,s]:= A[z,s] / B
END;




GLOBAL OPERATOR /< ( VAR A : RMATRIX; VAR B : COMPLEX )
                                      DIVDOWNMRCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  DIVDOWNMRCR[z,s]:= A[z,s] /< B
END;




GLOBAL OPERATOR /> ( VAR A : RMATRIX; VAR B : COMPLEX )
                                        DIVUPMRCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  DIVUPMRCR[z,s]:= A[z,s] /> B
END;




{---------------------------------------------------------------------------}
{         4.6.3 Operatoren fuer CMATRIX mit REAL                            }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( VAR A : CMATRIX; B : REAL )
                                       MULMCRR : CMATRIX [LB(A,1)..UB(A,1),
                                                          LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  MULMCRR[z,s]:= A[z,s] * B
END;




GLOBAL OPERATOR *< ( VAR A : CMATRIX; B : REAL )
                                    MULDOWNMCRR : CMATRIX [LB(A,1)..UB(A,1),
                                                           LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  MULDOWNMCRR[z,s]:= A[z,s] *< B
END;




GLOBAL OPERATOR *> ( VAR A : CMATRIX; B : REAL )
                                      MULUPMCRR : CMATRIX [LB(A,1)..UB(A,1),
                                                           LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  MULUPMCRR[z,s]:= A[z,s] *> B
END;




GLOBAL OPERATOR / ( VAR A : CMATRIX; B : REAL )
                                       DIVMCRR : CMATRIX [LB(A,1)..UB(A,1),
                                                          LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  DIVMCRR[z,s]:= A[z,s] / B
END;




GLOBAL OPERATOR /< ( VAR A : CMATRIX; B : REAL )
                                    DIVDOWNMCRR : CMATRIX [LB(A,1)..UB(A,1),
                                                           LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  DIVDOWNMCRR[z,s]:= A[z,s] /< B
END;




GLOBAL OPERATOR /> ( VAR A : CMATRIX; B : REAL )
                                      DIVUPMCRR : CMATRIX [LB(A,1)..UB(A,1),
                                                           LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  DIVUPMCRR[z,s]:= A[z,s] /> B
END;




{---------------------------------------------------------------------------}
{         4.6.4 Operatoren fuer CMATRIX mit COMPLEX                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( VAR A : CMATRIX; VAR B : COMPLEX )
                                         MULMCRCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  MULMCRCR[z,s]:= A[z,s] * B
END;




GLOBAL OPERATOR *< ( VAR A : CMATRIX; VAR B : COMPLEX )
                                     MULDOWNMCRCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  MULDOWNMCRCR[z,s]:= A[z,s] *< B
END;




GLOBAL OPERATOR *> ( VAR A : CMATRIX; VAR B : COMPLEX )
                                       MULUPMCRCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  MULUPMCRCR[z,s]:= A[z,s] *> B
END;




GLOBAL OPERATOR / ( VAR A : CMATRIX; VAR B : COMPLEX )
                                         DIVMCRCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  DIVMCRCR[z,s]:= A[z,s] / B
END;




GLOBAL OPERATOR /< ( VAR A : CMATRIX; VAR B : COMPLEX )
                                     DIVDOWNMCRCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  DIVDOWNMCRCR[z,s]:= A[z,s] /< B
END;




GLOBAL OPERATOR /> ( VAR A : CMATRIX; VAR B : COMPLEX )
                                       DIVUPMCRCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  DIVUPMCRCR[z,s]:= A[z,s] /> B
END;




{---------------------------------------------------------------------------}
{     4.7 Operatoren fuer RMATRIX, CMATRIX mit RVECTOR, CVECTOR             }
{---------------------------------------------------------------------------}
{SEKTOR A53                                                                 }
{---------------------------------------------------------------------------}
{         4.7.1 Operatoren fuer RMATRIX mit RVECTOR                         }
{---------------------------------------------------------------------------}




{                    Sind bereits im Modul MV_ARI definiert.                }




{---------------------------------------------------------------------------}
{         4.7.2 Operatoren fuer RMATRIX mit CVECTOR                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( VAR A : RMATRIX;  VAR B : CVECTOR )
                                         MULMRVCR : CVECTOR [LB(A,1)..UB(A,1)];
VAR i : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B) - LB(B) ) THEN  m_MATH_ERROR ( 203 )
  ELSE
    FOR i:= LB(A,1) TO UB(A,1) DO  MULMRVCR[i]:=  A[i] * B
END;




GLOBAL OPERATOR *< ( VAR A : RMATRIX;  VAR B : CVECTOR )
                                     MULDOWNMRVCR : CVECTOR [LB(A,1)..UB(A,1)];
VAR i : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B) - LB(B) ) THEN  m_MATH_ERROR ( 203 )
  ELSE
    FOR i:= LB(A,1) TO UB(A,1) DO  MULDOWNMRVCR[i]:= A[i] *< B
END;




GLOBAL OPERATOR *> ( VAR A : RMATRIX;  VAR B : CVECTOR )
                                       MULUPMRVCR : CVECTOR [LB(A,1)..UB(A,1)];
VAR i : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B) - LB(B) ) THEN  m_MATH_ERROR ( 203 )
  ELSE
    FOR i:= LB(A,1) TO UB(A,1) DO  MULUPMRVCR[i]:= A[i] *> B
END;




{---------------------------------------------------------------------------}
{         4.7.3 Operatoren fuer CMATRIX mit RVECTOR                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( VAR A : CMATRIX;  VAR B : RVECTOR )
                                         MULMCRVR : CVECTOR [LB(A,1)..UB(A,1)];
VAR i : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B) - LB(B) ) THEN  m_MATH_ERROR ( 203 )
  ELSE
    FOR i:= LB(A,1) TO UB(A,1) DO  MULMCRVR[i]:= A[i] * B
END;




GLOBAL OPERATOR *< ( VAR A : CMATRIX;  VAR B : RVECTOR )
                                     MULDOWNMCRVR : CVECTOR [LB(A,1)..UB(A,1)];
VAR i : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B) - LB(B) ) THEN  m_MATH_ERROR ( 203 )
  ELSE
    FOR i:= LB(A,1) TO UB(A,1) DO  MULDOWNMCRVR[i]:= A[i] *< B
END;




GLOBAL OPERATOR *> ( VAR A : CMATRIX;  VAR B : RVECTOR )
                                       MULUPMCRVR : CVECTOR [LB(A,1)..UB(A,1)];
VAR i : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B) - LB(B) ) THEN  m_MATH_ERROR ( 203 )
  ELSE
    FOR i:= LB(A,1) TO UB(A,1) DO  MULUPMCRVR[i]:= A[i] *> B
END;




{---------------------------------------------------------------------------}
{         4.7.4 Operatoren fuer CMATRIX mit CVECTOR                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR * ( VAR A : CMATRIX;  VAR B : CVECTOR )
                                        MULMCRVCR : CVECTOR [LB(A,1)..UB(A,1)];
VAR i : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B) - LB(B) ) THEN  m_MATH_ERROR ( 203 )
  ELSE
    FOR i:= LB(A,1) TO UB(A,1) DO  MULMCRVCR[i]:= A[i] * B
END;




GLOBAL OPERATOR *< ( VAR A : CMATRIX;  VAR B : CVECTOR )
                                    MULDOWNMCRVCR : CVECTOR [LB(A,1)..UB(A,1)];
VAR i : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B) - LB(B) ) THEN  m_MATH_ERROR ( 203 )
  ELSE
    FOR i:= LB(A,1) TO UB(A,1) DO  MULDOWNMCRVCR[i]:= A[i] *< B
END;




GLOBAL OPERATOR *> ( VAR A : CMATRIX;  VAR B : CVECTOR )
                                      MULUPMCRVCR : CVECTOR [LB(A,1)..UB(A,1)];
VAR i : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B) - LB(B) ) THEN  m_MATH_ERROR ( 203 )
  ELSE
    FOR i:= LB(A,1) TO UB(A,1) DO  MULUPMCRVCR[i]:= A[i] *> B
END;




{---------------------------------------------------------------------------}
{     4.8 Operatoren fuer RMATRIX, CMATRIX mit RMATRIX, CMATRIX             }
{---------------------------------------------------------------------------}
{SEKTOR A55                                                                 }
{---------------------------------------------------------------------------}
{         4.8.1 Operatoren fuer RMATRIX mit RMATRIX                         }
{---------------------------------------------------------------------------}




{                    Sind bereits im Modul MV_ARI definiert.                }




{---------------------------------------------------------------------------}
{         4.8.2 Operatoren fuer RMATRIX mit CMATRIX                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR + ( VAR A : RMATRIX; VAR B : CMATRIX )
                                         ADDMRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  ADDMRMCR[z,s]:= A[z,s] + B[z+d1,s+d2]
END;




GLOBAL OPERATOR +< ( VAR A : RMATRIX; VAR B : CMATRIX )
                                     ADDDOWNMRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  ADDDOWNMRMCR[z,s]:= A[z,s] +< B[z+d1,s+d2]
END;




GLOBAL OPERATOR +> ( VAR A : RMATRIX; VAR B : CMATRIX )
                                       ADDUPMRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  ADDUPMRMCR[z,s]:= A[z,s] +> B[z+d1,s+d2]
END;




GLOBAL OPERATOR - ( VAR A : RMATRIX; VAR B : CMATRIX )
                                         SUBMRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  SUBMRMCR[z,s]:= A[z,s] - B[z+d1,s+d2]
END;   




GLOBAL OPERATOR -< ( VAR A : RMATRIX; VAR B : CMATRIX )
                                     SUBDOWNMRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  SUBDOWNMRMCR[z,s]:= A[z,s] -< B[z+d1,s+d2]
END;   




GLOBAL OPERATOR -> ( VAR A : RMATRIX; VAR B : CMATRIX )
                                       SUBUPMRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  SUBUPMRMCR[z,s]:= A[z,s] -> B[z+d1,s+d2]
END;   




GLOBAL OPERATOR * ( VAR A : RMATRIX; VAR B : CMATRIX ) 
                                         MULMRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B,1) - LB(B,1) )  THEN  m_MATH_ERROR ( 204 )
  ELSE
    FOR z:= LB(A,1) TO UB(A,1) DO
    FOR s:= LB(B,2) TO UB(B,2) DO  MULMRMCR[z,s]:= A[z] * CVECTOR(B[*,s])
END;




GLOBAL OPERATOR *< ( VAR A : RMATRIX; VAR B : CMATRIX ) 
                                     MULDOWNMRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B,1) - LB(B,1) )  THEN  m_MATH_ERROR ( 204 )
  ELSE
    FOR z:= LB(A,1) TO UB(A,1) DO
    FOR s:= LB(B,2) TO UB(B,2) DO  MULDOWNMRMCR[z,s]:= A[z] *< CVECTOR(B[*,s])
END;




GLOBAL OPERATOR *> ( VAR A : RMATRIX; VAR B : CMATRIX ) 
                                       MULUPMRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B,1) - LB(B,1) )  THEN  m_MATH_ERROR ( 204 )
  ELSE
    FOR z:= LB(A,1) TO UB(A,1) DO
    FOR s:= LB(B,2) TO UB(B,2) DO  MULUPMRMCR[z,s]:= A[z] *> CVECTOR(B[*,s])
END;




{---------------------------------------------------------------------------}
{         4.8.3 Operatoren fuer CMATRIX mit RMATRIX                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR + ( VAR A : CMATRIX; VAR B : RMATRIX )
                                         ADDMCRMR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  ADDMCRMR[z,s]:= A[z,s] + B[z+d1,s+d2]
END;




GLOBAL OPERATOR +< ( VAR A : CMATRIX; VAR B : RMATRIX )
                                     ADDDOWNMCRMR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  ADDDOWNMCRMR[z,s]:= A[z,s] +< B[z+d1,s+d2]
END;




GLOBAL OPERATOR +> ( VAR A : CMATRIX; VAR B : RMATRIX )
                                       ADDUPMCRMR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  ADDUPMCRMR[z,s]:= A[z,s] +> B[z+d1,s+d2]
END;




GLOBAL OPERATOR - ( VAR A : CMATRIX; VAR B : RMATRIX )
                                         SUBMCRMR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  SUBMCRMR[z,s]:= A[z,s] - B[z+d1,s+d2]
END;   




GLOBAL OPERATOR -< ( VAR A : CMATRIX; VAR B : RMATRIX )
                                     SUBDOWNMCRMR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  SUBDOWNMCRMR[z,s]:= A[z,s] -< B[z+d1,s+d2]
END;   




GLOBAL OPERATOR -> ( VAR A : CMATRIX; VAR B : RMATRIX )
                                       SUBUPMCRMR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  SUBUPMCRMR[z,s]:= A[z,s] -> B[z+d1,s+d2]
END;




GLOBAL OPERATOR * ( VAR A : CMATRIX; VAR B : RMATRIX ) 
                                         MULMCRMR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B,1) - LB(B,1) )  THEN  m_MATH_ERROR ( 204 )
  ELSE
    FOR z:= LB(A,1) TO UB(A,1) DO
    FOR s:= LB(B,2) TO UB(B,2) DO  MULMCRMR[z,s]:= A[z] * RVECTOR(B[*,s])
END;




GLOBAL OPERATOR *< ( VAR A : CMATRIX; VAR B : RMATRIX ) 
                                     MULDOWNMCRMR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B,1) - LB(B,1) )  THEN  m_MATH_ERROR ( 204 )
  ELSE
    FOR z:= LB(A,1) TO UB(A,1) DO
    FOR s:= LB(B,2) TO UB(B,2) DO  MULDOWNMCRMR[z,s]:= A[z] *< RVECTOR(B[*,s])
END;




GLOBAL OPERATOR *> ( VAR A : CMATRIX; VAR B : RMATRIX ) 
                                       MULUPMCRMR : CMATRIX [LB(A,1)..UB(A,1),
                                                             LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B,1) - LB(B,1) )  THEN  m_MATH_ERROR ( 204 )
  ELSE
    FOR z:= LB(A,1) TO UB(A,1) DO
    FOR s:= LB(B,2) TO UB(B,2) DO  MULUPMCRMR[z,s]:= A[z] *> RVECTOR(B[*,s])
END;




{---------------------------------------------------------------------------}
{         4.8.4 Operatoren fuer CMATRIX mit CMATRIX                         }
{---------------------------------------------------------------------------}




GLOBAL OPERATOR + ( VAR A, B : CMATRIX )
                              ADDMCRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                   LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  ADDMCRMCR[z,s]:= A[z,s] + B[z+d1,s+d2]
END;




GLOBAL OPERATOR +< ( VAR A, B : CMATRIX )
                           ADDDOWNMCRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                    LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  ADDDOWNMCRMCR[z,s]:= A[z,s] +< B[z+d1,s+d2]
END;




GLOBAL OPERATOR +> ( VAR A, B : CMATRIX )
                             ADDUPMCRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                    LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  ADDUPMCRMCR[z,s]:= A[z,s] +> B[z+d1,s+d2]
END;




GLOBAL OPERATOR - ( VAR A, B : CMATRIX )
                              SUBMCRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                   LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  SUBMCRMCR[z,s]:= A[z,s] - B[z+d1,s+d2]
END;   




GLOBAL OPERATOR -< ( VAR A, B : CMATRIX )
                           SUBDOWNMCRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                    LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  SUBDOWNMCRMCR[z,s]:= A[z,s] -< B[z+d1,s+d2]
END;   




GLOBAL OPERATOR -> ( VAR A, B : CMATRIX )
                             SUBUPMCRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                    LB(A,2)..UB(A,2)];
VAR z,s, d1,d2,
    al1,al2,au1,au2, bl1,bl2,bu1,bu2 : INTEGER;

BEGIN
  al1:= LB(A,1);  au1:= UB(A,1);
  al2:= LB(A,2);  au2:= UB(A,2);
  bl1:= LB(B,1);  bu1:= UB(B,1);
  bl2:= LB(B,2);  bu2:= UB(B,2);

   d1:= bl1 - al1;
   d2:= bl2 - al2;

  IF ( au1-al1 <> bu1-bl1 ) OR ( au2-al2 <> bu2-bl2 ) THEN m_MATH_ERROR( 202 )
  ELSE
    FOR z:= al1 TO au1 DO
    FOR s:= al2 TO au2 DO  SUBUPMCRMCR[z,s]:= A[z,s] -> B[z+d1,s+d2]
END;   




GLOBAL OPERATOR * ( VAR A, B : CMATRIX ) 
                              MULMCRMCR : CMATRIX [LB(A,1)..UB(A,1) ,
                                                   LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B,1) - LB(B,1) )  THEN  m_MATH_ERROR ( 204 )
  ELSE
    FOR z:= LB(A,1) TO UB(A,1) DO
    FOR s:= LB(B,2) TO UB(B,2) DO MULMCRMCR[z,s]:= A[z] * CVECTOR(B[*,s])
END;




GLOBAL OPERATOR *< ( VAR A, B : CMATRIX ) 
                           MULDOWNMCRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                    LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B,1) - LB(B,1) )  THEN  m_MATH_ERROR ( 204 )
  ELSE
    FOR z:= LB(A,1) TO UB(A,1) DO
    FOR s:= LB(B,2) TO UB(B,2) DO MULDOWNMCRMCR[z,s]:= A[z] *< CVECTOR(B[*,s])
END;




GLOBAL OPERATOR *> ( VAR A, B : CMATRIX ) 
                             MULUPMCRMCR : CMATRIX [LB(A,1)..UB(A,1),
                                                    LB(B,2)..UB(B,2)];
VAR z,s : INTEGER;

BEGIN
  IF ( UB(A,2) - LB(A,2) <> UB(B,1) - LB(B,1) )  THEN  m_MATH_ERROR ( 204 )
  ELSE
    FOR z:= LB(A,1) TO UB(A,1) DO
    FOR s:= LB(B,2) TO UB(B,2) DO MULUPMCRMCR[z,s]:= A[z] *> CVECTOR(B[*,s])
END;




{---------------------------------------------------------------------------}
{ 5. Ein- / Ausgabe                                                         }
{---------------------------------------------------------------------------}



 
GLOBAL PROCEDURE READ  ( VAR F : TEXT; VAR A : CVECTOR );

VAR i : INTEGER;

BEGIN
  FOR i:= LB(A) TO UB(A) DO READ( F, A[i] )
END;




GLOBAL PROCEDURE WRITE ( VAR F : TEXT; VAR A : CVECTOR );

VAR i : INTEGER;

BEGIN
  WRITELN( F );
  FOR i:= LB(A) TO UB(A) DO WRITELN( F, A[i] );
END;




GLOBAL PROCEDURE READ  ( VAR F : TEXT; VAR A : CMATRIX );

VAR z,s : INTEGER;

BEGIN
  FOR z:= LB(A,1) TO UB(A,1) DO
  FOR s:= LB(A,2) TO UB(A,2) DO  READ( F, A[z,s] );
END;




GLOBAL PROCEDURE WRITE ( VAR F : TEXT; A : CMATRIX );

VAR z,s : INTEGER;

BEGIN
  WRITELN( F );
  FOR z:= LB(A,1) TO UB(A,1) DO
  BEGIN
    FOR s:= LB(A,2) TO UB(A,2) DO  WRITELN( F, A[z,s] );
    WRITELN( F )
  END
END;


END. { of module MVC_ARI }
