void compareJacobians(RRHandle gRR) { RoadRunner* rri = castToRoadRunner(gRR); ls::DoubleMatrix jFull = rri->getFullJacobian(); ls::DoubleMatrix jReduced = rri->getReducedJacobian(); //Check dimensions if(jFull.RSize() != jReduced.RSize() || jFull.CSize() != jReduced.CSize()) { CHECK(false); return; } for(int row = 0; row < jFull.RSize(); row++) { for(int col = 0; col < jFull.CSize(); col++) { CHECK_CLOSE(jFull(row, col), jReduced(row, col), 1e-6); } } }