Changeset 914 in Sophya for trunk/SophyaLib/TArray/triangmtx.h


Ignore:
Timestamp:
Apr 13, 2000, 6:04:50 PM (25 years ago)
Author:
ansari
Message:

documentation cmv 13/4/00

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/TArray/triangmtx.h

    r862 r914  
    11// This may look like C code, but it is really -*- C++ -*-
    2 /*! Class for inferior triangular matrix (base class for the class Alm) */
    32
    43#ifndef TRIANGMTX_H_SEEN
     
    109namespace SOPHYA {
    1110
     11//! Class for inferior triangular matrix (base class for the class Alm)
    1212template <class T>
    13 class TriangularMatrix
    14   {
    15    
    16   public :
     13class TriangularMatrix {
     14public :
    1715
     16//! Default constructor
    1817TriangularMatrix()   {};
    19   /* instanciate a triangular matrix from the number of rows */
     18//! instanciate a triangular matrix from the number of rows
    2019TriangularMatrix(int rowSize)  : long_diag_((uint_4)rowSize) {elem_.ReSize((uint_4) (rowSize*(rowSize+1)/2) ); };
     20//! Copy constructor (possibility of sharing datas)
    2121TriangularMatrix(const TriangularMatrix<T>& a,  bool share=false)  : elem_(a.elem_, share),  long_diag_(a.long_diag_) {;}
    22 /*! resize the matrix with a new number of rows */
     22
     23//! resize the matrix with a new number of rows
    2324inline void ReSizeRow(int rowSize)
    2425  {
     
    2829 inline void SetTemp(bool temp=false) const {elem_.SetTemp(temp);}
    2930
     31//! Equal operator
    3032inline TriangularMatrix<T>& operator = (const TriangularMatrix<T>& a)
    3133{
     
    3436  return *this;
    3537}
     38
     39//! () operator : access to elements row \b l and column \b m
    3640inline T& operator()(int l, int m)
    3741  {
    3842      return  elem_(adr_ij(l,m));
    3943  }
     44//! () operator : access to elements row \b l and column \b m
    4045inline T const& operator()(int l, int m) const
    4146  {
    4247      return *(elem_.Begin()+ adr_ij(l,m));
    4348  }
    44  inline  int_4  rowNumber() const {return (int_4)long_diag_;}
    45   private:
    46  /*! compute the address of an element in the single array representing the matrix */
     49
     50//! Return number of rows
     51inline  int_4  rowNumber() const {return (int_4)long_diag_;}
     52
     53private:
     54//! compute the address of an element in the single array representing the matrix
    4755inline uint_4 adr_ij(int i,int j) const
    4856{
     
    5664}
    5765
    58  uint_4 long_diag_;
    59  NDataBlock<T> elem_;
     66uint_4 long_diag_;    //!< size of the square matrix
     67NDataBlock<T> elem_;  //!< Data block
    6068
    6169  };
Note: See TracChangeset for help on using the changeset viewer.