Module: NoyesJava::JavaFilter

Included in:
DCT, DoubleDeltaFilter, HammingWindow, LiveCMN, LogCompressor, MelFilter, PowerSpectrumFilter
Defined in:
lib/java_impl/java_filter.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.ensure_jarray(array) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/java_impl/java_filter.rb', line 7

def self.ensure_jarray array
  if array.respond_to? :each
    array.to_java(Java::double[]).to_a
  else
	array
  end
end

Instance Method Details

#<<(data) ⇒ Object



3
4
5
6
# File 'lib/java_impl/java_filter.rb', line 3

def << data
  java_matrix = @filter.apply data.to_java Java::double[]
  java_matrix.map {|java_array|java_array.to_a}
end