Matrix.Max Method

Overload List

#SignatureDescription
1Double MaxMaximum value.
└ indexed: Double Max(Int32 Index, Int32 Len)
2void Max(ref Double AMax, ref Int32 AIndex)Calculate the maximum value of all calling object elements.
3void Max(ref Double AMax, Int32 Index, Int32 Len)Calculate the maximum value from calling object elements [Index]..[Index+Len-1]. The result AMean is a real value.
4void Max(ref Double AMax, ref Int32 AIndex, Int32 Index, Int32 Len)Calculate the maximum value of calling object elements [Index]..[Index+Len-1].

Overload 1: Double Max

Maximum value.

Returns: Double

Remarks:

Returns the maximum value of all calling object elements. The result is a real value. An exception is raised is calling object Dew.Math.Matrix.Complex is true.

Examples
Matrix a = new Matrix();
a.SetIt(2, 2, false, new double[] { 1.0, 2.0, 3.0, 4.0 });
double result = a.Max();
if (Math.Abs(result - 4.0) > 1e-10)
    throw new Exception("Matrix.Max: expected 4.0, got " + result);
Matrix a;
double b;
a.SetIt(2,2,false,new double[] {1,2,3,4});
b = a.Max; // b = 4
See Also: Matrix.Min, Matrix.Maxc, Matrix.MaxMin

Indexed: Double Max(Int32 Index, Int32 Len)

Returns the maximum value from calling object elements [Index]..[Index+Len-1]. The result is a real value.

#NameTypeDescription
1IndexInt32start index
2LenInt32element count

Returns: Double

Remarks:

An exception is raised if calling object Dew.Math.Matrix.Complex property is true or array borders are overrun.

Overload 2: void Max(ref Double AMax, ref Int32 AIndex)

Calculate the maximum value of all calling object elements.

#NameTypeDescription
1AMaxDouble (ref)output
2AIndexInt32 (ref)start index

Result: stored in self (calling object)

Remarks:

The AMax parameter returns the maximum value. The AIndex parameter returns the Index of maximum value. An exception is raised if calling object Dew.Math.Matrix.Complex property is true.

Overload 3: void Max(ref Double AMax, Int32 Index, Int32 Len)

Calculate the maximum value from calling object elements [Index]..[Index+Len-1]. The result AMean is a real value.

#NameTypeDescription
1AMaxDouble (ref)output
2IndexInt32start index
3LenInt32element count

Result: stored in self (calling object)

Remarks:

An exception is raised if calling object Dew.Math.Matrix.Complex property is true or array borders are overrun.

Overload 4: void Max(ref Double AMax, ref Int32 AIndex, Int32 Index, Int32 Len)

Calculate the maximum value of calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1AMaxDouble (ref)output
2AIndexInt32 (ref)start index
3IndexInt32start index
4LenInt32element count

Result: stored in self (calling object)

Remarks:

The AMax parameter returns the maximum value. The AIndex parameter returns the index of maximum value. An exception is raised if calling object Dew.Math.Matrix.Complex property is true or array borders are overrud/underrun.