resample vector in C++

CLOSED
Bids
10
Avg Bid (USD)
$131
Project Budget (USD)
$30 - $250

Project Description:
We need to resample vectors of doubles, either shrinking or expanding them by a factor which is also a double. Think of the samples as the integrals in the ranges [0..1[, [1, 2[... of an unknown function defined on a segment with a certain length; then change the unit of measure of this length by factor and recompute the ceil(newlength) new samples, again as integrals over [0..1[, [1, 2[... . This operation must conserve exactly the sum of the samples, and qualitatively the shape of the underlying function, although there is information loss when the samples are shrunk; it is sometime called conservative rebinning (just google "idl frebin").

In the attached C++ source you'll find a proposed interface; there are just 2 member functions to implement: vector::shrink and vector::expand.

In the spirit if TDD, in the attached source there is also a suite of 5 tests that do not pass at the moment. We'll add more tests, and generate new ones by tweaking the constants (factor, ifactor, 0.5 ...) in the existing tests. The focus should be covering all borderline cases which may cause truncation and numerical errors.

Skills required:
C++ Programming
Additional Files: shrink_expand.cc
About the employer:
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


$ 250
in 2 days
$ 230
in 1 days
$ 100
in 2 days
$ 150
in 4 days
$ 150
in 3 days
Hire tomaszkarwala
$ 100
in 5 days
$ 100
in 4 days
$ 30
in 4 days
$ 100
in 6 days
Hire martinhinsch
$ 100
in 3 days