Hello!
When drawing a curve (QwtPlotCurve, etc.) in a QwtPlot, one must provide an array of double values since QwtPlot itself uses double for coordinates (right?).
But lets say that one of my graphs will never require such precision; instead, lets, say, I want a QwtPlot with 600 x 400 where each point will correspond exactly as one pixel on the screen and the scales will also consider integer, not float precision (lets say that the minimum values in both scales will be 0-1, never a 0-0.5 or the like). For such a situation, the usage of double seems only unnecessary loose of processing, such not only I'll have to convert my vector of int into a vector of double (in embedded situation that's a nicely avoidable loop!), but also all the calculations "inside" Qwt's system will also be in double when, as sad, I need only integer precision.
If my assumptions are correct, is there a way to change this? Since all Qwt methods related to this consider double, this means I'ld have to edit the library, right? In this case, are there some considerations to pay attention to or it's just I matter of overloading the methods to use integer numbers?
Thanks,
Momergil


Reply With Quote

The point of my comment wasn't to talk about "how" samples are stored, but if they use only double values or of other kind (such as int).
I'm doing the work for a ARM processor (Texas' OMAP) that don't use a floating point unit :T So taking this into consideration plus the fact that floating values will never be shown on the interface plus the problem of limited processing, well then you may see it would have it's benefits if I could avoid double or float values as much as possible

Bookmarks