Overload List
| # | Signature | Description |
|---|---|---|
| 1 | Int32 Min | Minimum value. |
| └ indexed: Int32 Min(Int32 Index, Int32 Len) | ||
| 2 | Int32 Min(ref Int32 aIndex) | Calculate the minimum value of all calling object elements. |
| └ indexed: Int32 Min(ref Int32 aIndex, Int32 Index, Int32 Len) |
Overload 1: Int32 Min
Minimum value.
Returns: Int32 - The minimum value of all calling object elements. The result is an integer value.
Examples
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
TMtxInt a;
MtxVecInt.CreateIt(out a);
try
{
a.SetIt(false, new double[] {1,2,3,4});
int b = a.Min(); // 1
}
finally
{
MtxVecInt.FreeIt(ref a);
}
}
}
Indexed: Int32 Min(Int32 Index, Int32 Len)
Calculate the minimum value from calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Int32 | start index |
| 2 | Len | Int32 | element count |
Returns: Int32
Remarks:
The result is an integer value. An exception is raised if array borders are overrun.
Overload 2: Int32 Min(ref Int32 aIndex)
Calculate the minimum value of all calling object elements.
| # | Name | Description |
|---|---|---|
| 1 | aIndex | Stores minimum value index. |
Returns: Int32 - the minimum of all calling vector integer elements in-place.
Examples
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
TMtxInt a;
int ind;
MtxVecInt.CreateIt(out a);
try
{
a.SetIt(new int[] {1,2,3,4});
int min = a.Min(out ind); //min=1, ind = 0
}
finally
{
MtxVecInt.FreeIt(ref a);
}
}
}
Indexed: Int32 Min(ref Int32 aIndex, Int32 Index, Int32 Len)
Calculate the maximum value of calling object elements [Index..Index+Len-1].
| # | Name | Description |
|---|---|---|
| 1 | aIndex | Returns minimum value index. |
| 2 | Index | The starting index at which to start the search. |
| 3 | Len | The number of elements to search starting from Index. |
Returns: Int32 - the minimum of calling vector integer elements [Index..Index+Len-1].
Remarks:
An exception is raised if array borders are overrun/underrun.