Changeset 914 in Sophya for trunk/SophyaLib/TArray


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

documentation cmv 13/4/00

Location:
trunk/SophyaLib/TArray
Files:
4 edited

Legend:

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

    r894 r914  
    2323  TMatrix(const TMatrix<T>& a, bool share);
    2424  TMatrix(const TArray<T>& a);
    25   TMatrix(const TArray<T>& a,  bool share, short mm=CMemoryMapping);
     25  TMatrix(const TArray<T>& a,  bool share, short mm=AutoMemoryMapping);
    2626  virtual ~TMatrix();
    2727
  • 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  };
  • trunk/SophyaLib/TArray/tvector.cc

    r894 r914  
    1 // $Id: tvector.cc,v 1.4 2000-04-12 17:42:30 ansari Exp $
     1// $Id: tvector.cc,v 1.5 2000-04-13 16:04:49 ansari Exp $
    22//                         C.Magneville          04/99
    33#include "machdefs.h"
     
    7070 */
    7171template <class T>
    72 TVector<T>::TVector(const TArray<T>& a, bool share, short mm, short lcv )
     72TVector<T>::TVector(const TArray<T>& a, bool share, short lcv, short mm)
    7373: TMatrix<T>(a, share, mm)
    7474{
  • trunk/SophyaLib/TArray/tvector.h

    r898 r914  
    1717  // Creation / destruction
    1818  TVector();
    19   TVector(uint_4 n, short lcv=ColumnVector, short mm=AutoMemoryMapping);
     19  TVector(uint_4 n, short lcv=AutoVectorType, short mm=AutoMemoryMapping);
    2020  TVector(const TVector<T>& v);
    2121  TVector(const TVector<T>& v, bool share);
    2222  TVector(const TArray<T>& a);
    23   TVector(const TArray<T>& a,  bool share, short mm=CMemoryMapping, short lcv=ColumnVector);
     23  TVector(const TArray<T>& a,  bool share, short lcv=AutoVectorType, short mm=AutoMemoryMapping);
    2424
    2525  virtual ~TVector();
     
    2828  inline  TVector<T>& operator = (const TVector<T>& a)
    2929                       { Set(a);  return(*this); }
    30 
    3130
    3231  // Gestion taille/Remplissage
     
    5049  // Operateur d'affectation
    5150  //! Fill the vector with Sequence \b seq
    52   inline  TMatrix<T>&  operator = (Sequence seq) { SetSeq(seq); return(*this); }
     51  inline  TVector<T>&  operator = (Sequence seq) { SetSeq(seq); return(*this); }
    5352
    5453  // Operations diverses  avec une constante
Note: See TracChangeset for help on using the changeset viewer.