|
From: Kristof V. L. <kr...@co...> - 2004-06-29 13:47:10
|
Hi Stuart,
Stuart Reeves wrote:
> I want to be performing a vect[i].add_comp() but I notice that the method
> only accepts values between 0 and 255. The log files I'm testing my
> integration of LogFileParser and rtplot with have values that screw up the
> conversion to an unsigned 8bit value (such as -1). What was your thinking
> on the way in which scaling/accurate representation of these problematic
> values should be performed? I.e., should the vector object accept any
> values and scale them itself or should scaling be performed by the caller?
Ideally, I wanted to convert KVector to a template class (just like
BVector in the same file), but that would mean adjusting a lot of the
other files. I still plan to do it in the next months though..
I would argue for both approaches: sometimes you'd want to scale down
(when plotting hi-res sensordata on a handheld for instance) yourself,
sometimes you really need the vector to handle values that are floats or
more than 8 bits.. A template in that case would be our solution, I
think (without paying for it in performance).
> BTW, I have added (but not yet committed) a new field for <column> and
> <channel> entities called ``format.'' This can be set to ``float'' or
> ``integer'' to correspond with the DF_<type> defines.
Yep, that makes sense.
best,
Kristof.
http://www.comp.lancs.ac.uk/~kristof
|