Overload List
| # | Signature | Description |
|---|---|---|
| 1 | Double Max | Maximum value. |
| └ indexed: Double Max(Int32 Index, Int32 Len) | ||
| 2 | void Max(ref Double AMax, ref Int32 AIndex) | Calculate the maximum value of all calling object elements. |
| 3 | void Max(ref Double AMax, Int32 Index, Int32 Len) | Calculate the maximum value from calling object elements [Index]..[Index+Len-1]. |
| 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]. |
Overload 1: Double Max
Maximum value.
Returns: Double
Returns the maximum value of all calling object elements. The result is a real value. An exception is raised is calling object Dew.Math.Vector.Complex is true.
Vector a = new Vector();
a.SetIt(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("Vector.Max: expected 4.0, got " + result);
Vector a;
double b;
a.SetIt(false,new double[] {1,2,3,4});
b = a.Max; // b = 4
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.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Int32 | start index |
| 2 | Len | Int32 | element count |
Returns: Double
An exception is raised if calling object Dew.Math.Vector.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.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMax | Double (ref) | output |
| 2 | AIndex | Int32 (ref) | start index |
Result: stored in self (calling object)
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.Vector.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].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMax | Double (ref) | output |
| 2 | Index | Int32 | start index |
| 3 | Len | Int32 | element count |
Result: stored in self (calling object)
The result AMean is a real value. An exception is raised if calling object Dew.Math.Vector.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].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMax | Double (ref) | output |
| 2 | AIndex | Int32 (ref) | start index |
| 3 | Index | Int32 | start index |
| 4 | Len | Int32 | element count |
Result: stored in self (calling object)
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.Vector.Complex property is true or array borders are overrud/underrun.