30namespace func_sketch::plotter {
89 const std::vector<Point>& initial_samples)
const;
102 std::size_t left_index)
const;
115 std::size_t left_index)
const;
128 std::size_t left_index)
const;
143 std::vector<Point>& samples, std::size_t left_index)
const;
155 const Point& right_point)
const;
167 const Point& left_point,
const Point& right_point)
const;
Class to evaluate expressions.
bool divide_segment_according_to_y_change(const expressions::Expression &function, std::vector< Point > &samples, std::size_t left_index) const
Divide if the change of y is large.
bool divide_segment(const expressions::Expression &function, std::vector< Point > &samples, std::size_t left_index) const
Divide a segment into two segments in sample points if applicable.
std::vector< Point > sample_adaptive_points(const expressions::Expression &function, const std::vector< Point > &initial_samples) const
Sample additional points adaptively.
FunctionSampler & config(const PlotConfig &value)
Set the configuration of plots.
bool divide_segment_when_one_end_is_not_finite(const expressions::Expression &function, std::vector< Point > &samples, std::size_t left_index) const
Divide if one end of the segment is not finite.
std::vector< Point > operator()(const expressions::Expression &function) const
Sample a function for plotting.
FunctionSampler(const PlotRange &range, const PlotConfig &config)
Constructor.
bool divide_segment_according_to_slope_change(const expressions::Expression &function, std::vector< Point > &samples, std::size_t left_index) const
Divide if the change of slope of y is large.
PlotRange range_
Range of plots.
expressions::ExpressionEvaluator evaluator_
Evaluator of expressions.
std::vector< Point > sample_initial_points(const expressions::Expression &function) const
Sample initial points.
PlotConfig config_
Configuration of plots.
bool is_sampling_should_be_skipped(const Point &left_point, const Point &right_point) const
Check the condition to skip sampling of a point between two points.
Point sample_additional_point(const expressions::Expression &function, const Point &left_point, const Point &right_point) const
Sample an additional point between two points.
FunctionSampler & range(const PlotRange &value)
Set the range of plots.
Class of configurations of a plot.
Class of a range of a plot.
Definition of Expression class.
Definition of ExpressionEvaluator class.
Definition of PlotConfig class.
Definition of PlotRange class.
Definition of Point struct.