Class: DataOutput::ScaledOutput
- Inherits:
-
DatasetOutput
- Object
- BaseOutput
- DatasetOutput
- DataOutput::ScaledOutput
- Defined in:
- lib/output/data_output/scaled_output.rb
Overview
Child class of DatasetOutput to visualize a data set within the dimensions of the calling terminal.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#scaled_dataset ⇒ DataSet
readonly
private
The scaled dataset.
Attributes inherited from DatasetOutput
Attributes inherited from BaseOutput
#data_set, #legend, #with_extreme_values
Instance Method Summary collapse
-
#prepare_attributes(data_set, meta_data, options) ⇒ Object
private
method to set the required attributes und create the scaled dataset.
-
#print_output_head(index, meta_data) ⇒ Object
private
creates a headline before printing the data set based on the values of the z dimension.
Methods inherited from DatasetOutput
#print_meta_head, #print_meta_information, #print_meta_tail
Methods inherited from BaseOutput
#determine_output_type_and_print_value, #print_data, #print_data_and_get_extrema, #print_domain_information, #print_extreme_information, #print_extreme_values_for, #print_meta_information, #set_attributes
Instance Attribute Details
#scaled_dataset ⇒ DataSet (readonly, private)
Returns the scaled dataset.
14 15 16 |
# File 'lib/output/data_output/scaled_output.rb', line 14 def scaled_dataset @scaled_dataset end |
Instance Method Details
#prepare_attributes(data_set, meta_data, options) ⇒ Object (private)
method to set the required attributes und create the scaled dataset
20 21 22 23 24 25 26 |
# File 'lib/output/data_output/scaled_output.rb', line 20 def prepare_attributes(data_set, , ) # create meta data and data set for the scaled output sc = DatasetScaling.new(, data_set) @meta_data = sc. @scaled_dataset = sc.scaled_data_set set_attributes(@scaled_dataset, [:extreme_values]) end |
#print_output_head(index, meta_data) ⇒ Object (private)
creates a headline before printing the data set based on the values of the z dimension
31 32 33 34 35 |
# File 'lib/output/data_output/scaled_output.rb', line 31 def print_output_head(index, ) puts "\nPrinting autoscaled dataset for %.2f" % (.domain_z.lower + (index * .domain_z.step)) puts "\n" end |