#ifndef minn_plot_H #define minn_plot_H /* General tools and concepts for minimization with linear constraints. */ /* Last edited on 2023-03-27 15:01:13 by stolfi */ #define _GNU_SOURCE #include #include #include #include void minn_plot_goal ( FILE *wr, int32_t n, double u0[], double urad0, double u1[], double urad1, bool_t box, double step, minn_goal_t *F ); /* Writes to file {wr} a data for a 3D plot of the function {*F}, assumed defined over a the two-dimensional /plot domain/ of {\RR^n} defined by the major directions {u0,u1} (unit {n}-vectors) and the respective radii {urad0,urad1}. If if {box} is true, the plot domain is the rectangle {\RC}. If {box} is false the plot domain is an ellipse {\RF} IN both cases the center of the domain will be at the origin of {\RR^n}, its main directions will be {u0} and {u}, and its radii along those directions will be {urad0} and {urad1}. Namely, enumerates a grid of points with increment {step} on the plane defined by {u0} and {u1}. For each sample point {(s0*u0,s1*u1)} of that grid that lies inside the plot domain, computes the corresponding vector {v = s0*u0 + s1*u0} and writes to {wr} a line with {s0}, {s1}, and the goal function {F(n,v)}.*/ #endif