#include <kv/strobomap.hpp>
#include <kv/allsol.hpp>

namespace ub = boost::numeric::ublas;

typedef kv::interval<double> itv;


struct Func {
	template <class T> ub::vector<T> operator() (const ub::vector<T>& x, T t){
		ub::vector<T> y(2);

		y(0) = x(1);
		y(1) = - x(0)*x(0)*x(0) - 3.;

		return y;
	}
};

int main()
{
	ub::vector<itv> ix;

	std::cout.precision(17);

	Func f;

	kv::StroboMap<Func,double> g(f, (itv)0., (itv)1.);

	kv::Shooting_TPBVP< kv::StroboMap<Func,double>, double> h(g, 0., 0., 0, 0);

	ix.resize(1);
	ix(0) = itv(-100., 100.); 
	kv::allsol(h, ix, 2);
}
