Interface IVariableDictionary<V>
A template for a dictionary of strongly typed variables.
Inherited Members
Namespace: SpiceSharp.Simulations
Assembly: SpiceSharp.dll
Syntax
public interface IVariableDictionary<V> : IReadOnlyDictionary<string, V>, IReadOnlyCollection<KeyValuePair<string, V>>, IEnumerable<KeyValuePair<string, V>>, IEnumerable where V : IVariable
Type Parameters
| Name | Description |
|---|---|
| V | The variable type. |
Remarks
This can be used to map variables into a solver.
Properties
Comparer
Gets the comparer used for comparing variable names.
Declaration
IEqualityComparer<string> Comparer { get; }
Property Value
| Type | Description |
|---|---|
| IEqualityComparer<string> | The comparer. |
Methods
Add(string, V)
Adds a variable to the dictionary.
Declaration
void Add(string id, V variable)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The identifier. |
| V | variable | The variable. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
| ArgumentException | Thrown if a variable with the same identifier already exists. |