- Timestamp:
- 06/07/10 22:00:07 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/bdmbase.h
r1020 r1055 1185 1185 RV Urv; // 1186 1186 public: 1187 //! publicly acessible vector of observations 1188 vec dt; 1189 //! publicly writeble vector of inputs 1190 vec ut; 1191 1187 1192 //! default constructors 1188 1193 DS() : dtsize ( 0 ), utsize ( 0 ), Drv(), Urv(){ … … 1196 1201 } 1197 1202 //! Returns full vector of observed data=[output, input] 1198 virtual void getdata ( vec &dt ) const = 0; 1203 virtual void getdata ( vec &dt_out ) const { 1204 bdm_assert_debug(dtsize==dt.length(),"DS::getdata: dt is not of declared size;"); 1205 dt_out=dt; 1206 }; 1199 1207 1200 1208 //! Returns data records at indices. Default is inefficent. 1201 virtual void getdata ( vec &dt, const ivec &indices ) { 1202 vec tmp(dtsize); 1203 getdata(tmp); 1204 dt = tmp(indices); 1209 virtual void getdata ( vec &dt_out, const ivec &indices ) { 1210 bdm_assert_debug(max(indices)<dt.length(), "DS::getdata: indeces out of bounds"); 1211 dt_out = dt(indices); 1205 1212 }; 1206 1213