Vector.Max Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2

Overload List

Max<T>(Vector<T>) Returns the value of the largest component of a vector.
Max<T>(Vector<T>, T) Returns a vector whose elements are the maximum of the components of a vector and a real number.
Max<T>(Vector<T>, Vector<T>) Returns a vector whose elements are the maximums of the components of two vectors.
Max<T>(T, Vector<T>) Returns a vector whose elements are the maximum of the components of a vector and a real number.

Max<T>(Vector<T>)

Returns the value of the largest component of a vector.
C#
public static T Max<T>(
	this Vector<T> vector
)

Parameters

vector  Vector<T>
A Vector<T>.

Type Parameters

T

Return Value

T
The value of the largest component in vector.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. 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).

Max<T>(Vector<T>, T)

Returns a vector whose elements are the maximum of the components of a vector and a real number.
C#
public static Vector<T> Max<T>(
	this Vector<T> vector,
	T value
)

Parameters

vector  Vector<T>
A Vector<T>.
value  T
A real number.

Type Parameters

T

Return Value

Vector<T>
A vector whose elements are the largest of the corresponding element of vector and value.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. 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).

Exceptions

ArgumentNullException

vector is null.

Max<T>(Vector<T>, Vector<T>)

Returns a vector whose elements are the maximums of the components of two vectors.
C#
public static Vector<T> Max<T>(
	this Vector<T> left,
	Vector<T> right
)

Parameters

left  Vector<T>
A Vector<T>.
right  Vector<T>
A Vector<T>.

Type Parameters

T

Return Value

Vector<T>
A vector whose elements are the largest of the corresponding elements of left and right.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. 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).

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

DimensionMismatchException

The length of left is not equal to the length of right.

Max<T>(T, Vector<T>)

Returns a vector whose elements are the maximum of the components of a vector and a real number.
C#
public static Vector<T> Max<T>(
	T value,
	Vector<T> vector
)

Parameters

value  T
A real number.
vector  Vector<T>
A Vector<T>.

Type Parameters

T

Return Value

Vector<T>
A vector whose elements are the largest of the corresponding element of vector and value.

Exceptions

ArgumentNullException

vector is null.

See Also