Interface IVariableMap
A template for mapping a variable to indices.
Inherited Members
Namespace: SpiceSharp.Simulations
Assembly: SpiceSharp.dll
Syntax
public interface IVariableMap : IEnumerable<KeyValuePair<IVariable, int>>, IEnumerable
Properties
Count
Gets the number of mapped variables.
Declaration
int Count { get; }
Property Value
Type | Description |
---|---|
int | The number of mapped variables. |
this[IVariable]
Gets the index associated with the specified variable.
Declaration
int this[IVariable variable] { get; }
Parameters
Type | Name | Description |
---|---|---|
IVariable | variable | The variable. |
Property Value
Type | Description |
---|---|
int | The index. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
KeyNotFoundException | Thrown if the variable was not found. |
this[int]
Gets the variable associated to the specified index.
Declaration
IVariable this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | index | The index. |
Property Value
Type | Description |
---|---|
IVariable | The variable. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if no variable was found at the specified index. |
Methods
Contains(IVariable)
Determines whether a variable is mapped.
Declaration
bool Contains(IVariable variable)
Parameters
Type | Name | Description |
---|---|---|
IVariable | variable | The variable. |
Returns
Type | Description |
---|---|
bool |
|
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |