Exemple #1
0
void port_impl::solve_max_x(int i, const double obj_coeff) {

	ASSERT(i<=M); // C.size()==N

	C.at(i-1) = obj_coeff;

	try {

		call_solver();
	}
	catch (...) {

		C.at(i-1) = 0.0;

		throw;
	}

	C.at(i-1) = 0.0;
}
Exemple #2
0
static PyObject *
_ridder(PyObject *self, PyObject *args)
{
        return call_solver(ridder,self,args);
}
Exemple #3
0
static PyObject *
_brentq(PyObject *self, PyObject *args)
{
        return call_solver(brentq,self,args);
}
Exemple #4
0
static PyObject *
_bisect(PyObject *self, PyObject *args)
{
        return call_solver(bisect,self,args);
}