Changeset 1156 in Sophya for trunk/SophyaLib/TArray/utilarr.h


Ignore:
Timestamp:
Aug 29, 2000, 6:10:32 PM (25 years ago)
Author:
ansari
Message:

Introduction du type sa_size_t (taille des tableaux), operateur - (TArray::operator - et NegateElt()) - Reza 29/8/2000

File:
1 edited

Legend:

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

    r1103 r1156  
    3232public:
    3333  virtual ~Sequence();
    34   virtual MuTyV & Value(uint_8 k) const = 0;
    35   inline MuTyV & operator () (uint_8 k) const { return(Value(k)) ; }
     34  virtual MuTyV & Value(sa_size_t k) const = 0;
     35  inline MuTyV & operator () (sa_size_t k) const { return(Value(k)) ; }
    3636};
    3737
     
    4646  explicit RandomSequence(int typ = RandomSequence::Gaussian, double m=0., double s=1.);
    4747  virtual  ~RandomSequence();
    48   virtual MuTyV & Value(uint_8 k) const ;
     48  virtual MuTyV & Value(sa_size_t k) const ;
    4949  double   Rand();
    5050
     
    6868  inline double & Step() { return step_; }
    6969
    70   virtual MuTyV & Value(uint_8 k) const ;
     70  virtual MuTyV & Value(sa_size_t k) const ;
    7171
    7272protected:
     
    8080public:
    8181  virtual ~EnumeratedSequence();
    82   virtual MuTyV & Value(uint_8 k) const ;
     82  virtual MuTyV & Value(sa_size_t k) const ;
    8383  EnumeratedSequence & operator , (MuTyV const & v);
     84  EnumeratedSequence & operator = (MuTyV const & v);
    8485private:
    8586  vector<MuTyV> vecv_;
     
    8788};
    8889
    89 inline EnumeratedSequence operator , (MuTyV const & a, MuTyV const & b)
    90 { EnumeratedSequence seq;   return ((seq,a),b) ; }
     90  //inline EnumeratedSequence operator , (MuTyV const & a, MuTyV const & b)
     91  //{ EnumeratedSequence seq;   return ((seq,a),b) ; }
    9192
    9293//////////////////////////////////////////////////////////
     
    9495class Range {
    9596public:
    96   explicit Range(uint_4 start=0, uint_4 end=0, uint_4 size=1, uint_4 step=1);
     97  explicit Range(sa_size_t start=0, sa_size_t end=0, sa_size_t size=1, sa_size_t step=1);
    9798  //! Return the start index
    98   inline uint_4 & Start()  {  return start_; }
     99  inline sa_size_t & Start()  {  return start_; }
    99100  //! Return the last index
    100   inline uint_4 & End()    {  return end_; }
     101  inline sa_size_t & End()    {  return end_; }
    101102  //! Return the size
    102   inline uint_4 & Size()   {  return size_; }
     103  inline sa_size_t & Size()   {  return size_; }
    103104  //! Return the step
    104   inline uint_4 & Step()   {  return step_; }
     105  inline sa_size_t & Step()   {  return step_; }
    105106protected:
    106   uint_4 start_; //!< start index
    107   uint_4 end_;   //!< end index
    108   uint_4 size_;  //!< size
    109   uint_4 step_;  //!< step
     107  sa_size_t start_; //!< start index
     108  sa_size_t end_;   //!< end index
     109  sa_size_t size_;  //!< size
     110  sa_size_t step_;  //!< step
    110111};
    111112
     
    114115class IdentityMatrix {
    115116public:
    116   explicit IdentityMatrix(double diag=1., uint_4 n=0);
     117  explicit IdentityMatrix(double diag=1., sa_size_t n=0);
    117118  //! return the size of the identity matrix
    118   inline uint_4 Size() { return size_; }
     119  inline sa_size_t Size() { return size_; }
    119120  //! return the value of the diagonal elements
    120121  inline double Diag() { return diag_; }
    121122protected:
    122   uint_4 size_; //!< size of the matrix
     123  sa_size_t size_; //!< size of the matrix
    123124  double diag_; //!< value of the diagonal elements
    124125};
Note: See TracChangeset for help on using the changeset viewer.