Utilities to work with vectors.
VectorUtils
01 Syntax
Microsoft.VisualBasic.Data.GraphTheory.KNearNeighbors.HNSW.VectorUtils
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| Magnitude | 1 | Calculates magnitude of the vector. |
| Normalize | 1 | Turns vector to unit vector. |
| MagnitudeSIMD | 1 | SIMD optimized version of VectorUtils.Magnitude()). |
| NormalizeSIMD | 1 | SIMD optimized version of VectorUtils.Normalize()). |
03 Members
Magnitude(
IList(Of Single))Calculates magnitude of the vector.
Parameters
| Name | Type | Description |
|---|---|---|
vector | IList(Of Single) | The vector to calculate magnitude for. |
Returns
The magnitude.
Normalize(
IList(Of Single))Turns vector to unit vector.
Parameters
| Name | Type | Description |
|---|---|---|
vector | IList(Of Single) | The vector to normalize. |
MagnitudeSIMD(
Single())SIMD optimized version of VectorUtils.Magnitude().
Parameters
| Name | Type | Description |
|---|---|---|
vector | Single() | The vector to calculate magnitude for. |
Returns
The magnitude.
NormalizeSIMD(
Single())SIMD optimized version of VectorUtils.Normalize().
Parameters
| Name | Type | Description |
|---|---|---|
vector | Single() | The vector to normalize. |