implement about 30 C++ member functions of 1 existing class

We need to manipulate piecewise constant floating point-valued (double-precision) functions of integers (f: I->R). These are to be implemented according to the interfaces defined in the attached headers (see classes Function and PiecewiseConstant, ignore Linear, Polynomial, RationalFunction).

Exploiting operator overloading in C++, we want to manipulate PiecewiseConstant objects, add and substract them transparently as in:

double a: ConstantPiece b; PiecewiseConstant c; PiecewiseConstant d; d = a + b - c;

Our estimate is that there are 28 member functions to implement, this estimate can be off by +- 10%.

The good news is that there is a lot of boilerplate code !

There are two bad new though.

First one is: the same piecewise constant can be represented in different ways. For example a piecewise constant function with value -1.0 for strictly negative integers and +1.0 for positive integers can be represente as:

ConstantPiece(INT_MIN, INT_MAX, 1.0)+ConstantPiece(INT_MIN, -1, -2.0)

or as:

ConstantPiece(INT_MIN, -1, 1.0)-ConstantPiece(0, INT_MAX, -1.0)

We call the second representation canonical, i.e.:

- the pieces are sorted in order of strictly increasing min_ field

- and the domain of the pieces have null intersection

NOTE: it is the responsibility of the member functions that change the pieces to restore the canonical representation by calling the normalize member function if necessary !

Second bad new is: when two piecewise constant functions are added or subtracted, if their pieces have different boundaries, you need to break up and create new pieces in the destination function. And make sure the final result is in canonical form !

We want to use a TTD (Test Driven Development) approach. We have written a basic suite of tests, with 4 test functions TODO (see file [url removed, login to view]). The basic idea of the tests is that the piecewise functions can be evaluated for any value of the integer independent variable, using their operator(). Therefore all operations can be checked by brute-force iterating over a suitable range of integer values, and comparing the results with a manual implementation.

Before acceptance, the tests will have to cover all implemented functions (100% coverage). Writing the tests is not the responsibility of the coder, but in accordance to the TDD methodology, the coder is advised to test at least the basic functionality. If necessary, we will write the rest of the tests to reach the complete coverage.

Skills: C++ Programming, Mathematics

See more: writing programming in c++, writing polynomial functions, writing piecewise functions, writing linear functions, writing implement, writing functions in r, writing functions, tdd programming, r programming class, r linear programming, representation of integers, programming operator, programming news, programming methodology, programming functions, point of intersection, point intersection, operator overloading cplusplus, n.b.c. news, member one, linear programming example, intersection point, intersection and, integers form 1, integers and

About the Employer:
( 3 reviews ) Vercelli, Italy

Project ID: #3980414

16 freelancers are bidding on average $308 for this job


Please check your inbox. Thanks

$250 USD in 2 days
(178 Reviews)

Hello, I am expert and dedicated in C++ Development.I am very much interested for your project. I can complete your project quickly and efficiently in time. Details will be discussed in the message.

$250 USD in 2 days
(229 Reviews)

Let me help you. Check your pm for more details.

$250 USD in 7 days
(59 Reviews)

I can do it

$250 USD in 7 days
(21 Reviews)

I see it's a simple job. A bit like a C++ class assignment, though with a serious application. I've also made a bid for your rational function job. If you would happen to choose me for both, then I'd do them in sequenc More

$250 USD in 2 days
(7 Reviews)

Hi. I am an experienced C++ developer and I believe that I can implement the required functions in the given deadline.

$400 USD in 7 days
(4 Reviews)

Let me help you. Please check PMB!

$250 USD in 7 days
(11 Reviews)

Hi, I am an expert at C++ and I understand what you need. Please see my profile.

$370 USD in 6 days
(4 Reviews)

I have more than 5 years of c/c++ coding experience. Please check PM for further question.

$300 USD in 7 days
(1 Review)

Custom software development: w w w . The Administrator removed this message for containing contact details which breaches our Terms of Service . i o

$750 USD in 1 day
(0 Reviews)

Hi, I work with Numeric computing in my master thesis and I have 3 years of experiencie in this field. And, I have a great experience with C++ and algorithms. These are my spoj profiles : [url removed, login to view] More

$300 USD in 3 days
(0 Reviews)

I programmed in c++ for more than 15 years.

$300 USD in 7 days
(0 Reviews)

Hello, We are a team of two very good designers. We like this kind of project and we consider this challenging. Because we want to respect TDD approach the deadline is a little bigger. We want to do this thing right a More

$250 USD in 10 days
(0 Reviews)

Hi, I have more than 10 years experience in C/C++ Visual C++ and so on. I am sure i can help you. I is my chance to start my career in this site. Thanks in advance.

$250 USD in 2 days
(0 Reviews)

I have rich c++ experience.

$250 USD in 7 days
(0 Reviews)

I do this kind of functions in my work on daily basis, so I just hope you pick me. It would be a nice start on Freelancer for me.

$250 USD in 2 days
(0 Reviews)