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
public static T Replace<T>(
	this T array,
	Object from,
	Object to
where T : class
Request Example View Source


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

Type Parameters


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