Class SolverVariable<T>
An IVariable<T> that takes its value from an ISolverSimulationState<T>.
Inherited Members
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 |
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 |
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
Implements
Extension Methods
See Also
IVariable<T>