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. |
| └ indexed: void Max(ref Double AMax, ref Int32 aIndex, Int32 Index, Int32 Len) | ||
| 3 | Int32 Max(ref TCplx AMax, Int32 Index, Int32 Len) | Same as Dew.Math.TOpenCLMtxVec.Maxc method. |
| 4 | void Max(ref Double AMax, Int32 Index, Int32 Len) | Calculate the maximum value from calling object elements [Index]..[Index+Len-1]. |
Overload 1: Double Max
Maximum value.
Returns: Double - the maximum value of all calling object elements. The result is a real value.
An exception is raised is calling object Dew.Math.TOpenCLBase.Complex is true.
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
TOpenCLVector a;
clMtxVec.CreateIt(out a);
try
{
a.CopyFromArray( new double[] {1,2,3,4});
double b = a.Max(); // 4.0
}
finally
{
clMtxVec.FreeIt(ref a);
}
}
}
Indexed: Double Max(Int32 Index, Int32 Len)
Returns the maximum value from calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Int32 | start index |
| 2 | Len | Int32 | element count |
Returns: Double
The result is a real value. An exception is raised if calling object Dew.Math.TOpenCLBase.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) | output |
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.TOpenCLBase.Complex property is true.
Indexed: 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) | output |
| 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.TOpenCLBase.Complex property is true or array borders are overrud/underrun.
Overload 3: Int32 Max(ref TCplx AMax, Int32 Index, Int32 Len)
Same as Dew.Math.TOpenCLMtxVec.Maxc method.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMax | TCplx (ref) | output |
| 2 | Index | Int32 | start index |
| 3 | Len | Int32 | element count |
Returns: Int32
Overload 4: 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.TOpenCLBase.Complex property is true or array borders are overrun.