|
From: Mac R. <re...@no...> - 2002-07-14 15:50:29
|
At 05:30 PM 7/14/02 +0200, Zodiaq wrote:
>Hello Dev C++ users and others...
>
> my program have to change one array (one dimension) into another
>array (also one dimension) but with different number of elements but
>sum of values in both arrays MUST be tha SAME... so, as I recently
>heard, I need to do resampling... and now I'm looking for best way to
>do that - by best way I mean fastest and memory consumption doesn't
>matter... maybe somebody know some links to source code in C/C++?
>Thanks in advance...
Will the new array always be larger, always be smaller, or be larger or
smaller at different times during the run?
If the new array is always smaller, a relatively simple folding can be
done. Depending on the meaning of your arrays, you may need to split
entries and fold part of the value down and part of the value up.
If the new array is always larger, you're going to have to determine how to
split the value in one entry into two or more entries.
What do the values in these arrays represent? I am only familiar with
resampling in the context of audio waveforms and video images / pixel maps.
Neither of those cases requires the sum of the entries to be the same
after resampling as before, so I am curious what you are trying to resample.
Mac
-
_____________________________ /"\
Mac Reiter \ / ASCII Ribbon Campaign
Nomadics, Inc. X Against HTML Mail
re...@no... / \ (To join the campaign, simply use
this in your signature.)
|