Changeset 894 in Sophya for trunk/SophyaLib/TArray/tmatrix.cc


Ignore:
Timestamp:
Apr 12, 2000, 7:42:33 PM (25 years ago)
Author:
ansari
Message:

documentation cmv 12/4/00

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/TArray/tmatrix.cc

    r850 r894  
    1 // $Id: tmatrix.cc,v 1.5 2000-04-10 12:57:44 ansari Exp $
     1// $Id: tmatrix.cc,v 1.6 2000-04-12 17:42:21 ansari Exp $
    22//                         C.Magneville          04/99
    33#include "machdefs.h"
     
    1212////////////////////////////////////////////////////////////////
    1313//**** Createur, Destructeur
     14//! Default constructor
    1415template <class T>
    1516TMatrix<T>::TMatrix()
     
    2021}
    2122
     23//! constructor of a matrix with  r lines et c columns.
     24/*!
     25  \param r : number of rows
     26  \param c : number of columns
     27  \param mm : define the memory mapping type
     28  \sa ReSize
     29 */
    2230template <class T>
    2331TMatrix<T>::TMatrix(uint_4 r,uint_4 c, short mm)
     
    3038}
    3139
     40//! Constructor by copy (share data if \b a is temporary).
    3241template <class T>
    3342TMatrix<T>::TMatrix(const TMatrix<T>& a)
     
    3746}
    3847
     48//! Constructor by copy
     49/*!
     50  \param share : if true, share data. If false copy data
     51 */
    3952template <class T>
    4053TMatrix<T>::TMatrix(const TMatrix<T>& a, bool share)
     
    4457}
    4558
    46 
     59//! Constructor of a matrix from a TArray \b a
    4760template <class T>
    4861TMatrix<T>::TMatrix(const TArray<T>& a)
     
    5972}
    6073
     74//! Constructor of a matrix from a TArray \b a
     75/*!
     76  \param a : TArray to be copied or shared
     77  \param share : if true, share data. If false copy data
     78  \param mm : define the memory mapping type
     79 */
    6180template <class T>
    6281TMatrix<T>::TMatrix(const TArray<T>& a, bool share, short mm )
     
    7392}
    7493
     94//! Destructor
    7595template <class T>
    7696TMatrix<T>::~TMatrix()
    77 // Destructeur
    78 {
    79 
    80 }
    81 
     97{
     98}
     99
     100//! Set matirx equal to \b a and return *this
    82101template <class T>
    83102TArray<T>& TMatrix<T>::Set(const TArray<T>& a)
     
    95114}
    96115
     116//! Resize the matrix
     117/*!
     118  \param r : number of rows
     119  \param c : number of columns
     120  \param mm : define the memory mapping type
     121         (SameMemoryMapping,CMemoryMapping
     122         ,FortranMemoryMapping,DefaultMemoryMapping)
     123 */
    97124template <class T>
    98125void TMatrix<T>::ReSize(uint_4 r, uint_4 c, short mm)
     
    115142}
    116143
     144//! Re-allocate space for the matrix
     145/*!
     146  \param r : number of rows
     147  \param c : number of columns
     148  \param mm : define the memory mapping type
     149  \param force : if true re-allocation is forced, if not it occurs
     150          only if the required space is greater than the old one.
     151  \sa ReSize
     152 */
    117153template <class T>
    118154void TMatrix<T>::Realloc(uint_4 r,uint_4 c, short mm, bool force)
     
    136172
    137173// $CHECK$ Reza 03/2000  Doit-on declarer cette methode const ?
     174//! Return a submatrix define by \b Range \b rline and \b rcol
    138175template <class T>
    139176TMatrix<T> TMatrix<T>::SubMatrix(Range rline, Range rcol) const
     
    151188////////////////////////////////////////////////////////////////
    152189// Transposition
     190//! Transpose matrix in place
    153191template <class T>
    154192TMatrix<T>& TMatrix<T>::Transpose()
     
    163201
    164202
     203//! Transpose matrix into new matrix
     204/*!
     205  \param mm : define the memory mapping type
     206    (SameMemoryMapping,CMemoryMapping,FortranMemoryMapping)
     207  \return return a new matrix
     208 */
    165209template <class T>
    166210TMatrix<T> TMatrix<T>::Transpose(short mm)
     
    175219}
    176220
    177 // Rearrangement memoire
    178 // Si identique, renvoie une matrice qui partage les donnees
     221//! Rearrange data in memory memoire according to \b mm
     222/*!
     223  \param mm : define the memory mapping type
     224    (SameMemoryMapping,CMemoryMapping,FortranMemoryMapping)
     225  \warning If identical, return a matrix that share the datas
     226 */
    179227template <class T>
    180228TMatrix<T> TMatrix<T>::Rearrange(short mm)
     
    195243}
    196244
     245//! Set the matrix to the identity matrix \b imx
    197246template <class T>
    198247TMatrix<T>& TMatrix<T>::SetIdentity(IdentityMatrix imx)
     
    215264////////////////////////////////////////////////////////////////
    216265//**** Impression
     266//! Return info on number of rows, column and type \b T
    217267template <class T>
    218268string TMatrix<T>::InfoString() const
     
    226276}
    227277
     278//! Print matrix
     279/*!
     280  \param maxprt : maximum numer of print
     281  \param si : if true,  display attached DvList
     282  \sa SetMaxPrint
     283 */
    228284template <class T>
    229285void TMatrix<T>::Print(ostream& os, int_4 maxprt, bool si) const
     
    252308////////////////////////////////////////////////////////////////
    253309
     310//! Return the matrix product C = (*this)*B
     311/*!
     312  \param mm : define the memory mapping type for the return matrix
     313 */
    254314template <class T>
    255315TMatrix<T> TMatrix<T>::Multiply(const TMatrix<T>& b, short mm) const
Note: See TracChangeset for help on using the changeset viewer.