Class: BatchExperiment::PyaExtractor
- Inherits:
-
Object
- Object
- BatchExperiment::PyaExtractor
- Extended by:
- Extractor
- Defined in:
- lib/batch_experiment/sample_extractors.rb
Overview
Extractor for the output of the pyasukp program available at github.com/henriquebecker91/masters. Not of interest for the majority of the users of this gem. Kept as example, and for this gem author personal use.
Class Method Summary collapse
Methods included from Extractor
extract, extract_from_lines, get_field, get_hfield, names
Class Method Details
.extract_from_lines(lines) ⇒ Object
49 50 51 52 53 54 55 |
# File 'lib/batch_experiment/sample_extractors.rb', line 49 def self.extract_from_lines(lines) values = ['Total Time ', 'ext_time', 'ext_mem'].map do | label | Extractor.get_field(lines, label) end opt_key = '#The optimal value for the given capacity' values << Extractor.get_hfield(lines, opt_key) end |
.names ⇒ Object
45 46 47 |
# File 'lib/batch_experiment/sample_extractors.rb', line 45 def self.names ['internal time', 'external time', 'external memory', 'opt'] end |