Class: CompareCompressors::CostPlotter
- Defined in:
- lib/compare_compressors/plotters/cost_plotter.rb
Overview
Plot compression results to gnuplot in 2D cost space (time cost and space cost).
Constant Summary collapse
- DEFAULT_SHOW_COST_CONTOURS =
true
Constants inherited from Plotter
Plotter::DEFAULT_AUTOSCALE_FIX, Plotter::DEFAULT_LMARGIN, Plotter::DEFAULT_LOGSCALE_SIZE, Plotter::DEFAULT_OUTPUT, Plotter::DEFAULT_SHOW_LABELS, Plotter::DEFAULT_TERMINAL, Plotter::DEFAULT_TITLE, Plotter::DEFAULT_USE_CPU_TIME
Instance Attribute Summary collapse
-
#cost_model ⇒ Object
readonly
Returns the value of attribute cost_model.
-
#show_cost_contours ⇒ Object
readonly
Returns the value of attribute show_cost_contours.
Attributes inherited from Plotter
#autoscale_fix, #group_results, #io, #lmargin, #logscale_size, #output, #show_labels, #terminal, #title, #use_cpu_time
Instance Method Summary collapse
-
#initialize(cost_model, **options) ⇒ CostPlotter
constructor
A new instance of CostPlotter.
Methods inherited from Plotter
Constructor Details
#initialize(cost_model, **options) ⇒ CostPlotter
Returns a new instance of CostPlotter.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/compare_compressors/plotters/cost_plotter.rb', line 11 def initialize(cost_model, **) @cost_model = cost_model @show_cost_contours = \ if .key?(:show_cost_contours) .delete(:show_cost_contours) else DEFAULT_SHOW_COST_CONTOURS end super(**) end |
Instance Attribute Details
#cost_model ⇒ Object (readonly)
Returns the value of attribute cost_model.
22 23 24 |
# File 'lib/compare_compressors/plotters/cost_plotter.rb', line 22 def cost_model @cost_model end |
#show_cost_contours ⇒ Object (readonly)
Returns the value of attribute show_cost_contours.
23 24 25 |
# File 'lib/compare_compressors/plotters/cost_plotter.rb', line 23 def show_cost_contours @show_cost_contours end |