Changeset 422 for library/bdm/base/bdmbase.cpp
- Timestamp:
- 07/20/09 12:41:12 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/bdmbase.cpp
r384 r422 55 55 } 56 56 57 void RV::init ( Array<std::string> in_names, ivec in_sizes,ivec in_times ) { 57 void RV::init(const Array<std::string> &in_names, const ivec &in_sizes, const ivec &in_times) 58 { 58 59 len = in_names.length(); 59 60 it_assert_debug ( in_names.length() ==in_times.length(), "check \"times\" " ); … … 106 107 ret.dsize=ret.countsize(); 107 108 return ret; 109 } 110 111 RV RV::operator()(int di1, int di2) const 112 { 113 ivec sz = cumsizes(); 114 int i1 = 0; 115 while (sz(i1) < di1) i1++; 116 int i2 = i1; 117 while (sz(i2) < di2) i2++; 118 return subselect(linspace(i1, i2)); 108 119 } 109 120