Returns the trace of a square matrix. The trace of a square matrix is
defined to be the sum of the terms on its main diagonal:
Trace(A) = a11 + a22 +...+ ann
Namespace:
CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
public static float Trace( FloatMatrix A ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function Trace ( _ A As FloatMatrix _ ) As Single |
| Visual C++ |
|---|
public: static float Trace( FloatMatrix^ A ) |
Parameters
- A
- Type: CenterSpace.NMath.Core..::.FloatMatrix
A square matrix.
Return Value
The trace of A.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if the matrix A is not square. |