core/transform.rb
# +parts+ value array
# +interval+ count of values in an interval
+parts+ value array
+interval+ count of values in an interval
+ parts + value array + interval + count of values in an interval
def make_interval(parts, interval)
  ret = []
  parts.each do |part|
    if part.count > interval
      ret += part.first(interval)
    else
      padding = interval - part.count
      ret += part
      ret += Array.new(padding, 0)
    end
  end
  ret
end
def make_interval ( parts , interval ) ret = [ ] parts . each do | part | if part . count > interval ret += part . first ( interval ) else padding = interval - part . count ret += part ret += Array . new ( padding , 0 ) end end ret end
+parts+ value array
+interval+ count of values in an interval
+ parts + value array + interval + count of values in an interval
parts
<not_specific>
interval
<not_specific>