Show / Hide Table of Contents

Interface IVariableMap

A template for mapping a variable to indices.

Inherited Members
IEnumerable<KeyValuePair<IVariable, int>>.GetEnumerator()
IEnumerable.GetEnumerator()
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 variable is null.

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

true if the variable is mapped; otherwise, false.

Exceptions
Type Condition
ArgumentNullException

Thrown if variable is null.

Extension Methods

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

See Also

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