Skip to content
Snippets Groups Projects
Commit 51c48b08 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

curve refinement works. todo: segmentation

parent 28b0a5cd
No related branches found
No related tags found
No related merge requests found
......@@ -278,6 +278,7 @@ public:
int plot_curve_refine(CPlot* plot, const COlc* fc, int k, int j, int cstyle)
{
printf( "\nDEBUG REFINE\n" );
auto x2p = [&](const vector<double>& x) -> vector<CPt> {
vector<double> y = PCAST<const CObjVecDbl>(fc->eval_curve(x, k, j, false))->v;
vector<int> inRange = fc->eval_prange(x, k, j)->v;
......@@ -306,9 +307,8 @@ int plot_curve_refine(CPlot* plot, const COlc* fc, int k, int j, int cstyle)
vector<CPt> pp;
for (int iref=0; iref<13 && pp.size() < plot->maxpoints; ++iref) {
vector<CPt> pn = x2p(xn);
printf( "DEBUG %2i %6zu %6zu\n", iref, pp.size(), pn.size() );
vector<CPt> pp = triv::merge_sorted(pp, pn, pt_order);
printf( "DEBUG -> %6zu\n", pp.size() );
printf( "DEBUG %2i #pp=%6zu #pn=%6zu\n", iref, pp.size(), pn.size() );
pp = triv::merge_sorted(pp, pn, pt_order);
xn.clear();
// detect jumps:
......@@ -332,8 +332,8 @@ int plot_curve_refine(CPlot* plot, const COlc* fc, int k, int j, int cstyle)
}
po.push_back( *b );
}
pp.clear();
copy(po.begin(), po.end(), back_inserter(pp));
printf( "DEBUG -> #pp=%6zu #po=%6zu #xn=%6zu\n", pp.size(), po.size(), xn.size() );
pp = po;
if (!xn.size())
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment