ETHZ_Logo RAMSES_Logo_Right   RAMSES   RAMSES_Logo_Left Systems Ecology  
Start    search button      Modules:   A-Z   Function   Layer        QuickRefs:   DM   AuxLib   AuxLibE   SciLib   EasyMW   MW   ISIS   RMSLib

DEFINITION MODULE MatSclOps;

  (*******************************************************************

    Module  MatSclOps     (Version 1.0)

      Copyright (c) 1990-2006 by Olivier Roth, Andreas Fischlin and
      ETH Zurich.

    Purpose   Provide simple matrix operations such as
              addition, subtraction, multiplication.

    Remarks   This module is part of the Mat-library, which forms
              part of the RAMSES package.

              For real matrix operations see MatrixVecOps.


    Programming

      o Design
        Olivier Roth              03/12/1990
        Andreas Fischlin          28/05/1993

      o Implementation
        Olivier Roth              03/12/1990
        Andreas Fischlin          28/05/1993


    ETH Zurich
    Systems Ecology
    CHN E 35.1
    Universitaetstrasse 16
    8092 Zurich
    SWITZERLAND

    URLs:
        <mailto:RAMSES@env.ethz.ch>
        <http://www.sysecol.ethz.ch>
        <http://www.sysecol.ethz.ch/SimSoftware/RAMSES>


    Last revision of definition:  28/05/1993  AF

  *******************************************************************)


  FROM Matrices IMPORT Matrix;


  VAR
    matrixSclOpsOk: BOOLEAN; (* returns success of operation *)


  PROCEDURE AddVecToMatrixRow( v: Matrix;
                               m: Matrix;  irow: INTEGER );

  PROCEDURE AddVecToMatrixCol( v: Matrix;
                               m: Matrix;  icol: INTEGER );


  PROCEDURE ColSum  ( a: Matrix;   VAR rowVec: Matrix );

  PROCEDURE RowSum  ( a: Matrix;   VAR colVec: Matrix );

  PROCEDURE TotSum  ( a: Matrix ): REAL;


  PROCEDURE DiagVec ( a: Matrix;   VAR r: Matrix );

  PROCEDURE DiagSum ( a: Matrix ): REAL;

  PROCEDURE DiagProd( a: Matrix ): REAL;


  PROCEDURE EqualMatrix( a, b: Matrix;  maxErr: REAL ): BOOLEAN;


  PROCEDURE ScalarMul( a: Matrix; scal: REAL );

  PROCEDURE ScalarDiv( a: Matrix; scal: REAL );


  PROCEDURE ScalarVecProd( a, b: Matrix ): REAL;
  (* a and b must have dimensions 1 x n and n x 1 resp. *)


END MatSclOps.

  Contact RAMSES@env.ethz.ch Last updated: 25-Jul-2011 [Top of page]