Class Sine
This class describes a sine wave.
Implements
Inherited Members
Namespace: SpiceSharp.Components
Assembly: SpiceSharp.dll
Syntax
public class Sine : ParameterSet<IWaveformDescription>, IWaveformDescription, ICloneable<IWaveformDescription>, IImportParameterSet<double>, IExportPropertySet<double>, IImportParameterSet<double[]>, IImportParameterSet<GivenParameter<double>>, IExportPropertySet<GivenParameter<double>>, IParameterSet
Constructors
Sine()
Initializes a new instance of the Sine class.
Declaration
public Sine()
Sine(double, double, double)
Initializes a new instance of the Sine class.
Declaration
public Sine(double offset, double amplitude, double frequency)
Parameters
Type | Name | Description |
---|---|---|
double | offset | The offset. |
double | amplitude | The amplitude. |
double | frequency | The frequency. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if |
Sine(double, double, double, double, double)
Initializes a new instance of the Sine class.
Declaration
public Sine(double offset, double amplitude, double frequency, double delay, double theta)
Parameters
Type | Name | Description |
---|---|---|
double | offset | The offset. |
double | amplitude | The amplitude. |
double | frequency | The frequency. |
double | delay | The delay. |
double | theta | The theta. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if |
Sine(double, double, double, double, double, double)
Initializes a new instance of the Sine class.
Declaration
public Sine(double offset, double amplitude, double frequency, double delay, double theta, double phase)
Parameters
Type | Name | Description |
---|---|---|
double | offset | The offset. |
double | amplitude | The amplitude. |
double | frequency | The frequency. |
double | delay | The delay. |
double | theta | The theta. |
double | phase | The phase. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if |
Properties
Amplitude
Gets or sets the amplitude of the sine wave.
Declaration
[ParameterName("va")]
[ParameterInfo("The amplitude of the sine wave")]
public double Amplitude { get; set; }
Property Value
Type | Description |
---|---|
double | The amplitude of the sine wave. |
Delay
Gets or sets the delay of the sine wave in seconds.
Declaration
[ParameterName("td")]
[ParameterInfo("The delay", Units = "s")]
public double Delay { get; set; }
Property Value
Type | Description |
---|---|
double | The delay of the sine wave. |
Frequency
Gets or sets the frequency of the sine wave in Hertz (Hz).
Declaration
[ParameterName("freq")]
[ParameterInfo("The frequency in Hz", Units = "Hz")]
[GreaterThanOrEquals(0)]
public GivenParameter<double> Frequency { get; set; }
Property Value
Type | Description |
---|---|
GivenParameter<double> | The frequency of the sine wave. |
Offset
Gets or sets the offset.
Declaration
[ParameterName("vo")]
[ParameterInfo("The offset of the sine wave")]
public double Offset { get; set; }
Property Value
Type | Description |
---|---|
double | The offset of the sine wave. |
Phase
Gets or sets the phase of the sine wave.
Declaration
[ParameterName("phase")]
[ParameterInfo("The phase", Units = "°")]
public double Phase { get; set; }
Property Value
Type | Description |
---|---|
double | The phase. |
Theta
Gets or sets the damping factor theta of the sine wave.
Declaration
[ParameterName("theta")]
[ParameterInfo("The damping factor")]
public double Theta { get; set; }
Property Value
Type | Description |
---|---|
double | The damping factor theta. |
Methods
Create(IBindingContext)
Creates a waveform instance for the specified simulation and entity.
Declaration
public IWaveform Create(IBindingContext context)
Parameters
Type | Name | Description |
---|---|---|
IBindingContext | context | The binding context. |
Returns
Type | Description |
---|---|
IWaveform | The waveform instance. |
SetSine(double[])
Sets all the sine parameters.
Declaration
[ParameterName("sine")]
[ParameterInfo("A vector of all sine waveform parameters")]
public void SetSine(double[] sine)
Parameters
Type | Name | Description |
---|---|---|
double[] | sine | The sine parameters. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if |
ToString()
Returns a string that represents the current sine waveform.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current sine waveform. |