Show / Hide Table of Contents

Class Sine

This class describes a sine wave.

Inheritance
object
ParameterSet
ParameterSet<IWaveformDescription>
Sine
Implements
IWaveformDescription
ICloneable<IWaveformDescription>
IImportParameterSet<double>
IExportPropertySet<double>
IImportParameterSet<double[]>
IImportParameterSet<GivenParameter<double>>
IExportPropertySet<GivenParameter<double>>
IParameterSet
Inherited Members
ParameterSet<IWaveformDescription>.Clone()
ParameterSet.SetParameter<P>(string, P)
ParameterSet.TrySetParameter<P>(string, P)
ParameterSet.GetProperty<P>(string)
ParameterSet.TryGetProperty<P>(string, out P)
ParameterSet.CreateParameterSetter<P>(string)
ParameterSet.CreatePropertyGetter<P>(string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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 frequency is negative.

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 frequency is negative.

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 frequency is negative.

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 sine does not have 1 to 6 arguments.

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.

Overrides
object.ToString()

Implements

IWaveformDescription
ICloneable<T>
IImportParameterSet<P>
IExportPropertySet<P>
IImportParameterSet<P>
IImportParameterSet<P>
IExportPropertySet<P>
IParameterSet

Extension Methods

Utility.ThrowIfNull<T>(T, string)
Documentation.ParameterValues<T>(IParameterSet, bool)
Documentation.Parameters(IParameterSet)

See Also

ParameterSet
IWaveformDescription
In this article
Back to top Generated by DocFX