added 2D and 4D linear approximator with tests.