Show / Hide Table of Contents

Class FrequencySimulation.ComplexSimulationState

A simulation state using complex numbers.

Inheritance
object
VariableDictionary<IVariable<Complex>>
FrequencySimulation.ComplexSimulationState
Implements
IComplexSimulationState
ISolverSimulationState<Complex>
ISimulationState
IVariableFactory<IVariable<Complex>>
IVariableDictionary<IVariable<Complex>>
IReadOnlyDictionary<string, IVariable<Complex>>
IReadOnlyCollection<KeyValuePair<string, IVariable<Complex>>>
IEnumerable<KeyValuePair<string, IVariable<Complex>>>
IEnumerable
Inherited Members
VariableDictionary<IVariable<Complex>>.Comparer
VariableDictionary<IVariable<Complex>>.Count
VariableDictionary<IVariable<Complex>>.Keys
VariableDictionary<IVariable<Complex>>.Values
VariableDictionary<IVariable<Complex>>.this[string]
VariableDictionary<IVariable<Complex>>.Add(string, IVariable<Complex>)
VariableDictionary<IVariable<Complex>>.ContainsKey(string)
VariableDictionary<IVariable<Complex>>.TryGetValue(string, out IVariable<Complex>)
VariableDictionary<IVariable<Complex>>.GetEnumerator()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SpiceSharp.Simulations
Assembly: SpiceSharp.dll
Syntax
protected class FrequencySimulation.ComplexSimulationState : VariableDictionary<IVariable<Complex>>, IComplexSimulationState, ISolverSimulationState<Complex>, ISimulationState, IVariableFactory<IVariable<Complex>>, IVariableDictionary<IVariable<Complex>>, IReadOnlyDictionary<string, IVariable<Complex>>, IReadOnlyCollection<KeyValuePair<string, IVariable<Complex>>>, IEnumerable<KeyValuePair<string, IVariable<Complex>>>, IEnumerable

Constructors

ComplexSimulationState(ISparsePivotingSolver<Complex>, IEqualityComparer<string>)

Initializes a new instance of the FrequencySimulation.ComplexSimulationState class.

Declaration
public ComplexSimulationState(ISparsePivotingSolver<Complex> solver, IEqualityComparer<string> comparer)
Parameters
Type Name Description
ISparsePivotingSolver<Complex> solver

The solver.

IEqualityComparer<string> comparer

The comparer.

Exceptions
Type Condition
ArgumentNullException

Thrown if solver is null.

Properties

Laplace

Gets or sets the current laplace variable.

Declaration
public Complex Laplace { get; set; }
Property Value
Type Description
Complex

The laplace.

Map

Gets the IVariableMap that maps variables to indices for the solver.

Declaration
public IVariableMap Map { get; }
Property Value
Type Description
IVariableMap

The variable map.

Solution

Gets the solution to the solved equations.

Declaration
public IVector<Complex> Solution { get; }
Property Value
Type Description
IVector<Complex>

The solution.

Solver

Gets the solver used to solve the system of equations.

Declaration
public ISparsePivotingSolver<Complex> Solver { get; }
Property Value
Type Description
ISparsePivotingSolver<Complex>

The solver.

Methods

CreatePrivateVariable(string, IUnit)

Creates a variable that is private to whoever requested it. The factory will not shared this variable with anyone else, and the name is only used for display purposes.

Declaration
public IVariable<Complex> CreatePrivateVariable(string name, IUnit unit)
Parameters
Type Name Description
string name

The name of the private variable.

IUnit unit

The unit of the variable.

Returns
Type Description
IVariable<Complex>

The private variable.

GetSharedVariable(string)

Gets a variable that can be shared with other behaviors by the factory. If another variable already exists with the same name, that is returned instead.

Declaration
public IVariable<Complex> GetSharedVariable(string name)
Parameters
Type Name Description
string name

The name of the shared variable.

Returns
Type Description
IVariable<Complex>

The shared variable.

Exceptions
Type Condition
ArgumentNullException

Thrown if name is null.

Setup()

Set up the simulation state for the simulation.

Declaration
public void Setup()

Implements

IComplexSimulationState
ISolverSimulationState<T>
ISimulationState
IVariableFactory<V>
IVariableDictionary<V>
IReadOnlyDictionary<TKey, TValue>
IReadOnlyCollection<T>
IEnumerable<T>
IEnumerable

Extension Methods

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

See Also

IComplexSimulationState
In this article
Back to top Generated by DocFX