func_sketch._cpp module#
C++ module for func_sketch
- class func_sketch._cpp.Expression#
Bases:
objectClass of expressions.
- class func_sketch._cpp.ExpressionParser(*args, **kwargs)#
Bases:
objectClass of parser for expressions.
Objects of this class can be called with a string to parse it into an Expression object.
- class func_sketch._cpp.FunctionSampler(*args, **kwargs)#
Bases:
objectClass to sample functions for plotting.
- property config#
Configuration of plots. (write-only)
- property range#
Range of plots. (write-only)
- class func_sketch._cpp.PlotConfig(*args, **kwargs)#
Bases:
objectClass of configurations of plots.
- property axes_color#
Color of axes.
- property axes_line_width#
Line width of axes in pixels.
- property background_color#
Color of background.
- property bottom_margin#
Bottom margin of plots in pixels.
- property curve_line_width#
Line width of curves in pixels.
- property grid_color#
Color of grid lines.
- property grid_line_width#
Line width of grid lines in pixels.
- property initial_num_sample_points#
Number of points to sample initially in adaptive sampling.
- property left_margin#
Left margin of plots in pixels.
- property max_coordinate_change_rate#
Threshold of the change in coordinates of sample points relative to the plot range in adaptive sampling.
- property max_num_sample_points#
Maximum number of points to sample in adaptive sampling.
Note
This value should be larger than initial_num_sample_points. Otherwise, this configuration has no effect.
Note
This value is limited for safety limit of memory usage.
- property min_param_change_rate#
Minimum rate of parameter change in adaptive sampling.
Note
This value is limited for safety limit of memory usage.
- property num_pixels_per_tick_in_x_axis#
Number of pixels per tick in the x-axis.
- property num_pixels_per_tick_in_y_axis#
Number of pixels per tick in the y-axis.
- property right_margin#
Right margin of plots in pixels.
- property slope_change_threshold#
Threshold of the change in slope normalized by the plot range in adaptive sampling.
- property tick_label_font_size#
Font size of tick labels in pixels.
- property top_margin#
Top margin of plots in pixels.
- property zero_line_width#
Line width of the grid line at zero in pixels.
- class func_sketch._cpp.PlotRange(*args, **kwargs)#
Bases:
objectClass of ranges of plots.
- property x_range#
Range of x-axis.
- property y_range#
Range of y-axis.
- class func_sketch._cpp.Plotter(*args, **kwargs)#
Bases:
objectClass for plotting.
- property config#
Configuration of plots. (write-only)
- property range#
Range of plots. (write-only)
- write_background(self, image: ndarray[dtype=uint8, shape=(*, *, 3), order='C', device='cpu']) None#
Write background of a plot.
The pixels of image are modified in place.
- write_curve(self, point_list: func_sketch._cpp.PointList, color: func_sketch._cpp.RGBColor, image: ndarray[dtype=uint8, shape=(*, *, 3), order='C', device='cpu']) None#
Write a curve on a plot.
The pixels of image are modified in place.
- class func_sketch._cpp.Point(*args, **kwargs)#
Bases:
objectClass of points.
- property x#
X coordinate.
- property y#
Y coordinate.