Calculates the dot product of a sparse vector and a dense vector.
Namespace:
CenterSpace.NMath.MatrixAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
public static double Dot( DoubleSparseVector w, DoubleVector v ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function Dot ( _ w As DoubleSparseVector, _ v As DoubleVector _ ) As Double |
| Visual C++ |
|---|
public: static double Dot( DoubleSparseVector^ w, DoubleVector^ v ) |
Parameters
- w
- Type: CenterSpace.NMath.Matrix..::.DoubleSparseVector
A sparse vector.
- v
- Type: CenterSpace.NMath.Core..::.DoubleVector
A dense vector.
Return Value
The dot product.
Remarks
d = v[0]w[0] + v[1]w[1]...
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if v or w has zero length. |