-
Notifications
You must be signed in to change notification settings - Fork 0
Matches component values in one axis
License
AuteurAudio/ruby-component-match
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
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
About
Matches component values in one axis
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published