Click or drag to resize
Accord.NET (logo)

MatrixReplaceT Method

Replaces one value by another in a matrix of any dimensions. This is not an optimized operation.

Namespace:  Accord.Math
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public static T Replace<T>(
	this T array,
	Object from,
	Object to
)
where T : class
Request Example View Source

Parameters

array
Type: T
The array where elements will be replaced.
from
Type: SystemObject
The values which should be replaced.
to
Type: SystemObject
The value to put in place of from.

Type Parameters

T

Return Value

Type: T
A new array where all instances of from have been replaced with to.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also