/// <summary> /// Initializes a new instance of the <see cref="DC"/> class. /// </summary> /// <param name="name">The identifier of the simulation.</param> /// <param name="source">The source identifier.</param> /// <param name="start">The starting value.</param> /// <param name="stop">The stop value.</param> /// <param name="step">The step value.</param> public DC(string name, string source, double start, double stop, double step) : base(name) { var config = new DCConfiguration(); var s = new SweepConfiguration(source, start, stop, step); config.Sweeps.Add(s); Configurations.Add(config); }
/// <summary> /// Initializes a new instance of the <see cref="DC"/> class. /// </summary> /// <param name="name">The identifier of the simulation.</param> /// <param name="sweeps">The sweeps.</param> /// <exception cref="ArgumentNullException">sweeps</exception> public DC(string name, IEnumerable <SweepConfiguration> sweeps) : base(name) { sweeps.ThrowIfNull(nameof(sweeps)); var dcconfig = new DCConfiguration(); foreach (var sweep in sweeps) { dcconfig.Sweeps.Add(sweep); } Configurations.Add(dcconfig); }
/// <summary> /// Initializes a new instance of the <see cref="DC"/> class. /// </summary> /// <param name="name">The identifier of the simulation.</param> /// <param name="sweeps">The sweeps.</param> /// <exception cref="ArgumentNullException">sweeps</exception> public DC(string name, IEnumerable <SweepConfiguration> sweeps) : base(name) { if (sweeps == null) { throw new ArgumentNullException(nameof(sweeps)); } var dcconfig = new DCConfiguration(); foreach (var sweep in sweeps) { dcconfig.Sweeps.Add(sweep); } Configurations.Add(dcconfig); }