Show / Hide Table of Contents

Interface IVariableDictionary<V>

A template for a dictionary of strongly typed variables.

Inherited Members
IReadOnlyDictionary<string, V>.ContainsKey(string)
IReadOnlyDictionary<string, V>.TryGetValue(string, out V)
IReadOnlyDictionary<string, V>.this[string]
IReadOnlyDictionary<string, V>.Keys
IReadOnlyDictionary<string, V>.Values
IReadOnlyCollection<KeyValuePair<string, V>>.Count
IEnumerable<KeyValuePair<string, V>>.GetEnumerator()
IEnumerable.GetEnumerator()
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 id or variable is null.

ArgumentException

Thrown if a variable with the same identifier already exists.

Extension Methods

Utility.ThrowIfNull<T>(T, string)
Utility.ThrowIfEmpty<T>(IEnumerable<T>, string)

See Also

IReadOnlyDictionary<TKey, TValue>
IReadOnlyDictionary<TKey, TValue>
IVariable
In this article
Back to top Generated by DocFX