Gets the covariance between two sets of values.
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Shared Function Covariance ( _ data1 As Vector, _ data2 As Vector _ ) As Double |
| C# |
|---|
public static double Covariance ( Vector data1, Vector data2 ) |
| C++ |
|---|
public: static double Covariance ( Vector^ data1, Vector^ data2 ) |
Parameters
- data1 (Extreme.Mathematics.LinearAlgebra.Vector)
- A Double array.
- data2 (Extreme.Mathematics.LinearAlgebra.Vector)
- A Double array.
Return Value
The covariance between the two sets of values.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | data1 is nullNothingnullptr.
-or- data2 is nullNothingnullptr. |
| DimensionMismatchException | The length of data1 does not equal the length of data2. |