Class: Dsp::Systems::System

Inherits:
Object
  • Object
show all
Includes:
Convolvable::InstanceMethods, FourierTransformable, Initializable
Defined in:
lib/systems/system.rb

Direct Known Subclasses

HilbertTransform, RaisedCosineFilter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ System

Returns a new instance of System.



6
7
8
9
# File 'lib/systems/system.rb', line 6

def initialize(data)
    @data = data
    initialize_modules(Dsp::FourierTransformable => {time_data: data})
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



3
4
5
# File 'lib/systems/system.rb', line 3

def data
  @data
end

Instance Method Details

#to_aObject



15
16
17
# File 'lib/systems/system.rb', line 15

def to_a
    self.data
end

#to_dsObject



11
12
13
# File 'lib/systems/system.rb', line 11

def to_ds
    Dsp::DigitalSignal.new(data: self.data)
end