Click or drag to resize
Accord.NET (logo) MatrixAddToDiagonal Method (Double, Double, Boolean)

Note: This API is now obsolete.

Adds a scalar to the diagonal of a matrix.

Namespace:  Accord.Math
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.4.0
Syntax
[ObsoleteAttribute("Please use the Elementwise class instead.")]
public static double[][] AddToDiagonal(
	double[][] matrix,
	double scalar,
	bool inPlace = false
)
Request Example View Source

Parameters

matrix
Type: SystemDouble
A matrix.
scalar
Type: SystemDouble
A scalar.
inPlace (Optional)
Type: SystemBoolean
True to perform the operation in-place, overwriting the original matrix; false to return a new matrix.

Return Value

Type: Double
See Also