Show / Hide Table of Contents

Class SolverVariable<T>

An IVariable<T> that takes its value from an ISolverSimulationState<T>.

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

The base value type.

Constructors

SolverVariable(ISolverSimulationState<T>, string, int, IUnit)

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

Declaration
public SolverVariable(ISolverSimulationState<T> state, string name, int index, IUnit unit)
Parameters
Type Name Description
ISolverSimulationState<T> state

The state where to find the solution of the variable.

string name

The name of the variable.

int index

The index of the variable.

IUnit unit

The unit of the variable.

Exceptions
Type Condition
ArgumentNullException

Thrown if state is null.

Properties

Name

Gets the name of the variable.

Declaration
public string Name { get; }
Property Value
Type Description
string

The name of the variable. Can be null.

Unit

Gets the units of the quantity.

Declaration
public IUnit Unit { get; }
Property Value
Type Description
IUnit

The units.

Value

Gets the value of the variable.

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

The value.

Methods

ToString()

Converts to string.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents this instance.

Overrides
object.ToString()

Implements

IVariable<T>
IVariable

Extension Methods

Utility.ThrowIfNull<T>(T, string)

See Also

IVariable<T>
In this article
Back to top Generated by DocFX