Class Sampler
A sampler that forces a time simulation to hit certain time-points using timestep truncation.
Implements
Inherited Members
Namespace: SpiceSharp.Components
Assembly: SpiceSharp.dll
Syntax
public class Sampler : Entity<Parameters>, IEntity, IParameterSetCollection, IParameterSet, ICloneable<IEntity>, IParameterized<Parameters>
Constructors
Sampler(string)
Initializes a new instance of the Sampler class.
Declaration
public Sampler(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the sampler. |
Sampler(string, IEnumerable<double>)
Initializes a new instance of the Sampler class.
Declaration
public Sampler(string name, IEnumerable<double> timepoints)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the sampler. |
IEnumerable<double> | timepoints | The timepoints to hit. |
Sampler(string, IEnumerable<double>, EventHandler<EventArgs>)
Initializes a new instance of the Sampler class.
Declaration
public Sampler(string name, IEnumerable<double> timepoints, EventHandler<EventArgs> callback)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name. |
IEnumerable<double> | timepoints | The timepoint. |
EventHandler<EventArgs> | callback | The callback method. |
Methods
CreateBehaviors(ISimulation)
Creates the behaviors and stores them in the specified container.
Declaration
public override void CreateBehaviors(ISimulation simulation)
Parameters
Type | Name | Description |
---|---|---|
ISimulation | simulation | The simulation. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
ArgumentException | Thrown if the simulation does not use an IComplexSimulationState. |
TypeNotFoundException | Thrown if a required behavior or parameter set could not be found. |
AmbiguousTypeException | Thrown if a behavior or parameter set could not be resolved unambiguously. |