comparison data/model/DenseThreeDimensionalModel.h @ 1069:32ab6c48efaa

Merge from branch tonioni
author Chris Cannam
date Mon, 20 Apr 2015 09:11:34 +0100
parents cc27f35aa75c
children aa588c391d1a fa1bec83441e
comparison
equal deleted inserted replaced
1036:682d64f05e72 1069:32ab6c48efaa
91 /** 91 /**
92 * Return the value of bin n, if any. This is a "vertical scale" 92 * Return the value of bin n, if any. This is a "vertical scale"
93 * value which does not vary from one column to the next. This is 93 * value which does not vary from one column to the next. This is
94 * only meaningful if hasBinValues() returns true. 94 * only meaningful if hasBinValues() returns true.
95 */ 95 */
96 virtual float getBinValue(int n) const { return n; } 96 virtual float getBinValue(int n) const { return float(n); }
97 97
98 /** 98 /**
99 * Obtain the name of the unit of the values returned from 99 * Obtain the name of the unit of the values returned from
100 * getBinValue(), if any. 100 * getBinValue(), if any.
101 */ 101 */
169 } 169 }
170 virtual SortType getSortType(int) const { 170 virtual SortType getSortType(int) const {
171 return SortNumeric; 171 return SortNumeric;
172 } 172 }
173 173
174 virtual long getFrameForRow(int row) const { 174 virtual sv_frame_t getFrameForRow(int row) const {
175 return row * getResolution(); 175 return sv_frame_t(row) * getResolution();
176 } 176 }
177 virtual int getRowForFrame(long frame) const { 177 virtual int getRowForFrame(sv_frame_t frame) const {
178 return frame / getResolution(); 178 return int(frame / getResolution());
179 } 179 }
180 180
181 protected: 181 protected:
182 DenseThreeDimensionalModel() { } 182 DenseThreeDimensionalModel() { }
183 }; 183 };