Interface IVector<T>
A description of a vector.
Namespace: SpiceSharp.Algebra
Assembly: SpiceSharp.dll
Syntax
public interface IVector<T>
Type Parameters
| Name | Description |
|---|---|
| T | The base type. |
Properties
this[int]
Gets or sets the value at the specified index.
Declaration
T this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index. |
Property Value
| Type | Description |
|---|---|
| T | The value. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown if |
Length
Gets the length of the vector.
Declaration
int Length { get; }
Property Value
| Type | Description |
|---|---|
| int | The length. |
Methods
Clear()
Clears all elements in the vector. The size of the vector becomes 0.
Declaration
void Clear()
CopyTo(IVector<T>)
Copies the contents of the vector to another one.
Declaration
void CopyTo(IVector<T> target)
Parameters
| Type | Name | Description |
|---|---|---|
| IVector<T> | target | The target vector. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
| ArgumentException | Thrown if |
Reset()
Resets all elements in the vector to their default value.
Declaration
void Reset()
SwapElements(int, int)
Swaps two elements in the vector.
Declaration
void SwapElements(int index1, int index2)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index1 | The first index. |
| int | index2 | The second index. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown if |