Interface ISparseVector<T>
Describes a vector that can be stepped through.
Inherited Members
Namespace: SpiceSharp.Algebra
Assembly: SpiceSharp.dll
Syntax
public interface ISparseVector<T> : IVector<T>
Type Parameters
| Name | Description |
|---|---|
| T |
Properties
ElementCount
Gets the number of elements in the vector.
Declaration
int ElementCount { get; }
Property Value
| Type | Description |
|---|---|
| int | The element count. |
Methods
FindElement(int)
Finds a vector element at the specified index.
Declaration
Element<T> FindElement(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index. |
Returns
| Type | Description |
|---|---|
| Element<T> | The vector element; otherwise |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown if |
GetElement(int)
Gets a vector element at the specified index. If it doesn't exist, a new one is created.
Declaration
Element<T> GetElement(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index. |
Returns
| Type | Description |
|---|---|
| Element<T> | The vector element. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown if |
GetFirstInVector()
Gets the first ISparseVectorElement<T> in the vector.
Declaration
ISparseVectorElement<T> GetFirstInVector()
Returns
| Type | Description |
|---|---|
| ISparseVectorElement<T> | The first element in the vector. |
GetLastInVector()
Gets the last ISparseVectorElement<T> in the vector.
Declaration
ISparseVectorElement<T> GetLastInVector()
Returns
| Type | Description |
|---|---|
| ISparseVectorElement<T> | The last element in the vector. |
RemoveElement(int)
Removes a vector element at the specified index.
Declaration
bool RemoveElement(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index. |
Returns
| Type | Description |
|---|---|
| bool |
|