Show / Hide Table of Contents

Struct TwoPort<T>

A structure containing the unknowns for a two-port.

Inherited Members
ValueType.ToString()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: SpiceSharp.Components.CommonBehaviors
Assembly: SpiceSharp.dll
Syntax
public readonly struct TwoPort<T>
Type Parameters
Name Description
T

The base value type.

Remarks

A two-port is a device with two ports. Each defined by a voltage over them, and where the current in one of the nodes is equal to the current out of the other one of the same port.

Constructors

TwoPort(IVariableFactory<IVariable<T>>, IComponentBindingContext)

Initializes a new instance of the TwoPort<T> struct.

Declaration
public TwoPort(IVariableFactory<IVariable<T>> factory, IComponentBindingContext context)
Parameters
Type Name Description
IVariableFactory<IVariable<T>> factory

The factory.

IComponentBindingContext context

The context.

Fields

Left

The left port.

Declaration
public readonly OnePort<T> Left
Field Value
Type Description
OnePort<T>

Right

The right port.

Declaration
public readonly OnePort<T> Right
Field Value
Type Description
OnePort<T>

Methods

Equals(object)

Determines whether the specified object, is equal to this instance.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj

The object to compare with this instance.

Returns
Type Description
bool

true if the specified object is equal to this instance; otherwise, false.

Overrides
ValueType.Equals(object)

GetHashCode()

Returns a hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides
ValueType.GetHashCode()

Operators

operator ==(TwoPort<T>, TwoPort<T>)

Implements the operator ==.

Declaration
public static bool operator ==(TwoPort<T> left, TwoPort<T> right)
Parameters
Type Name Description
TwoPort<T> left

The left.

TwoPort<T> right

The right.

Returns
Type Description
bool

The result of the operator.

operator !=(TwoPort<T>, TwoPort<T>)

Implements the operator !=.

Declaration
public static bool operator !=(TwoPort<T> left, TwoPort<T> right)
Parameters
Type Name Description
TwoPort<T> left

The left.

TwoPort<T> right

The right.

Returns
Type Description
bool

The result of the operator.

Extension Methods

Utility.ThrowIfNull<T>(T, string)
In this article
Back to top Generated by DocFX