Overload List
| # | Signature | Description |
|---|---|---|
| 1 | Double Product | Elements product. |
| └ indexed: Double Product(Int32 Index, Int32 Len) | ||
| 2 | void Product(ref TCplx X) | Calculate the product of all calling object complex elements. |
| └ indexed: void Product(ref TCplx X, Int32 Index, Int32 Len) | ||
| 3 | void Product(ref Double X) | Calculate the product of all calling object elements. |
| └ indexed: void Product(ref Double X, Int32 Index, Int32 Len) |
Overload 1: Double Product
Elements product.
Returns: Double - the product of all calling object elements
An exception is raised if calling object Dew.Math.clVector.Complex property 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 c = a.Product(); // c= 24
}
finally
{
clMtxVec.FreeIt(ref a);
}
}
}
Indexed: Double Product(Int32 Index, Int32 Len)
Returns the product for calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Int32 | start index |
| 2 | Len | Int32 | element count |
Returns: Double
An exception is raised if array borders are overrun or underrun.
Overload 2: void Product(ref TCplx X)
Calculate the product of all calling object complex elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TCplx (ref) | output |
Result: stored in self (calling object)
Store the result in complex variable X.
Indexed: void Product(ref TCplx X, Int32 Index, Int32 Len)
Calculate the product for calling object complex elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TCplx (ref) | output |
| 2 | Index | Int32 | start index |
| 3 | Len | Int32 | element count |
Result: stored in self (calling object)
Store the result in complex variable X. An exception is raised if array borders are overrun or underrun.
Overload 3: void Product(ref Double X)
Calculate the product of all calling object elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | Double (ref) | output |
Result: stored in self (calling object)
Store the result in real variable X.
Indexed: void Product(ref Double X, Int32 Index, Int32 Len)
Calculate the product for calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | Double (ref) | output |
| 2 | Index | Int32 | start index |
| 3 | Len | Int32 | element count |
Result: stored in self (calling object)
Store the result in real variable X. An exception is raised if array borders are overrun or underrun.