public override List <SignalSample> GetSamples() { StepsGenerator steps = new StepsGenerator(new double[] { 3d, 10d, 14d }, new double[] { 1d, 4d, -2d }); SignalSampler samplers = new SignalSampler(steps); return(samplers.GetSamples(20d, 0.1d)); }
public void GetSampleTest() { var stepsGenerator = new StepsGenerator(); var time = 0d; var desiredSample = new SignalSample() { time = time, value = 1d }; var actualSample = stepsGenerator.GetSample(time); Assert.AreEqual(desiredSample, actualSample); }
public static void Step(ILoop loop, double time, double dt, double stepValue, SimulateCallback callback = null) { ISignalGenerator steps = new StepsGenerator(stepValue, 0d); Signal(loop, time, dt, steps, callback); }
public void Initialize() { var stepGenerator = new StepsGenerator(); Convertor = new NumberToRomanConvertor(stepGenerator); }
public NumberToRomanConvertor(StepsGenerator stepsGenerator) { _stepsGenerator = stepsGenerator; }