Show / Hide Table of Contents

Class StateValue<T>

An integration state that can track a value of a specified type.

Inheritance
object
StateValue<T>
Implements
IIntegrationState
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SpiceSharp.Simulations.IntegrationMethods
Assembly: SpiceSharp.dll
Syntax
public class StateValue<T> : IIntegrationState
Type Parameters
Name Description
T

The value type.

Constructors

StateValue(IHistory<T>)

Initializes a new instance of the StateValue<T> class.

Declaration
public StateValue(IHistory<T> history)
Parameters
Type Name Description
IHistory<T> history

The history.

StateValue(int)

Initializes a new instance of the StateValue<T> class.

Declaration
public StateValue(int length)
Parameters
Type Name Description
int length

The number of points to be tracked.

Exceptions
Type Condition
ArgumentException

Thrown if the number of points is smaller than 1.

Properties

Value

Gets or sets the current value.

Declaration
public T Value { get; set; }
Property Value
Type Description
T

The current value.

Methods

Accept()

Accepts the current point and moves on to the next.

Declaration
public void Accept()

GetPreviousValue(int)

Gets a previous value of the state. An index of 0 indicates the current value.

Declaration
public T GetPreviousValue(int index)
Parameters
Type Name Description
int index

The number of points to go back in time.

Returns
Type Description
T

The previous value.

Implements

IIntegrationState

Extension Methods

Utility.ThrowIfNull<T>(T, string)

See Also

IIntegrationState
In this article
Back to top Generated by DocFX