コード例 #1
0
        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));
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public void Initialize()
 {
     var stepGenerator = new StepsGenerator();
     Convertor = new NumberToRomanConvertor(stepGenerator);
 }
コード例 #5
0
 public NumberToRomanConvertor(StepsGenerator stepsGenerator)
 {
     _stepsGenerator = stepsGenerator;
 }