Skip to content

AuteurAudio/ruby-component-match

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

                A Ruby Component Value Matcher
                ------------------------------


Overview:   Matches components on a single measured
            axis that is orderable (float).  Input can 
            be programatic via array or by way of CSV
            with column number specified.  Results can
            be computed and returned in absolute terms
            or in percentage terms, absolute being the
            default.  There are accessors for the 
            matched and residual component data if one
            needs to use it as a library, and a 
            convenience report generator if one needs a
            one-liner part matching utility.

Method:     Iterative passes taking best adjacent pairing
            in forward and reverse sweeps until there are
            no more potential pairs meeting tolerance
            criteria. 

Examples:   See example.rb for a running example.

            Match 1st column of CSV to 0.02 (absolute) and
            produce a printed report:
                ComponentMatch.new('some.csv')
                              .match(0.02)
                              .report

            Match array to 2 (percent) and produces a
            printed report:
                ComponentMatch.new([1,2,3])
                              .match(2,'percent')
                              .report
        
            Match 3rd column of CSV to 0.3 (absolute) and
            return the matched data:
                ComponentMatch.new('some.csv',2)
                              .match(0.3)
                              .matched

Releases

No releases published

Packages

No packages published

Languages