public Adder() { this.InputComponents = new List <Component>(); this.OutputComponents = new List <Component>(); mySolver = new DSPAlgorithms.Algorithms.Adder(); this.Data = new AdderAttributes(); }
/// <summary> /// To do: Subtract Signal2 from Signal1 /// i.e OutSig = Sig1 - Sig2 /// </summary> public override void Run() { MultiplySignalByConstant Signal_To_Be_Multiplied = new MultiplySignalByConstant(); Signal_To_Be_Multiplied.InputSignal = InputSignal2; Signal_To_Be_Multiplied.InputConstant = -1; Signal_To_Be_Multiplied.Run(); List <Signal> Input_Signal_To_Adder = new List <Signal>(); Input_Signal_To_Adder.Add(InputSignal1); Input_Signal_To_Adder.Add(Signal_To_Be_Multiplied.OutputMultipliedSignal); Adder Signals_To_Be_Added = new Adder(); Signals_To_Be_Added.InputSignals = Input_Signal_To_Adder; Signals_To_Be_Added.Run(); OutputSignal = Signals_To_Be_Added.OutputSignal; //throw new NotImplementedException(); }