Changeset 1156 in Sophya for trunk/SophyaLib/TArray/utilarr.h
- Timestamp:
- Aug 29, 2000, 6:10:32 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/utilarr.h
r1103 r1156 32 32 public: 33 33 virtual ~Sequence(); 34 virtual MuTyV & Value( uint_8k) const = 0;35 inline MuTyV & operator () ( uint_8k) 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)) ; } 36 36 }; 37 37 … … 46 46 explicit RandomSequence(int typ = RandomSequence::Gaussian, double m=0., double s=1.); 47 47 virtual ~RandomSequence(); 48 virtual MuTyV & Value( uint_8k) const ;48 virtual MuTyV & Value(sa_size_t k) const ; 49 49 double Rand(); 50 50 … … 68 68 inline double & Step() { return step_; } 69 69 70 virtual MuTyV & Value( uint_8k) const ;70 virtual MuTyV & Value(sa_size_t k) const ; 71 71 72 72 protected: … … 80 80 public: 81 81 virtual ~EnumeratedSequence(); 82 virtual MuTyV & Value( uint_8k) const ;82 virtual MuTyV & Value(sa_size_t k) const ; 83 83 EnumeratedSequence & operator , (MuTyV const & v); 84 EnumeratedSequence & operator = (MuTyV const & v); 84 85 private: 85 86 vector<MuTyV> vecv_; … … 87 88 }; 88 89 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) ; } 91 92 92 93 ////////////////////////////////////////////////////////// … … 94 95 class Range { 95 96 public: 96 explicit Range( uint_4 start=0, uint_4 end=0, uint_4 size=1, uint_4step=1);97 explicit Range(sa_size_t start=0, sa_size_t end=0, sa_size_t size=1, sa_size_t step=1); 97 98 //! Return the start index 98 inline uint_4& Start() { return start_; }99 inline sa_size_t & Start() { return start_; } 99 100 //! Return the last index 100 inline uint_4& End() { return end_; }101 inline sa_size_t & End() { return end_; } 101 102 //! Return the size 102 inline uint_4& Size() { return size_; }103 inline sa_size_t & Size() { return size_; } 103 104 //! Return the step 104 inline uint_4& Step() { return step_; }105 inline sa_size_t & Step() { return step_; } 105 106 protected: 106 uint_4start_; //!< start index107 uint_4end_; //!< end index108 uint_4size_; //!< size109 uint_4step_; //!< step107 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 110 111 }; 111 112 … … 114 115 class IdentityMatrix { 115 116 public: 116 explicit IdentityMatrix(double diag=1., uint_4n=0);117 explicit IdentityMatrix(double diag=1., sa_size_t n=0); 117 118 //! return the size of the identity matrix 118 inline uint_4Size() { return size_; }119 inline sa_size_t Size() { return size_; } 119 120 //! return the value of the diagonal elements 120 121 inline double Diag() { return diag_; } 121 122 protected: 122 uint_4size_; //!< size of the matrix123 sa_size_t size_; //!< size of the matrix 123 124 double diag_; //!< value of the diagonal elements 124 125 };
Note:
See TracChangeset
for help on using the changeset viewer.