Matrix.Product Method

Overload List

#SignatureDescription
1Double ProductElements product.
└ indexed: Double Product(Int32 Index, Int32 Len)
2void Product(ref TCplx X)Calculate the product of all calling object complex elements.
└ indexed: void Product(ref TCplx X, Int32 Index, Int32 Len)
3void Product(ref Double X)Calculate the product of all calling object elements and store the result in real variable X.
└ 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:

Remarks:

An exception is raised if calling object Dew.Math.Matrix.Complex property 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.Product();
if (Math.Abs(result - 24.0) > 1e-10)
    throw new Exception("Matrix.Product: expected 24.0, got " + result);
Matrix a;
double c;
a.SetIt(1,4,false,new double[] {1,2,3,4});
c = a.Product; // c= 24
See Also: Matrix.Productc

Indexed: Double Product(Int32 Index, Int32 Len)

Returns the product for calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1IndexInt32start index
2LenInt32element count

Returns: Double

Remarks:

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.

#NameTypeDescription
1XTCplx (ref)output

Result: stored in self (calling object)

Remarks:

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].

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

Result: stored in self (calling object)

Remarks:

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 and store the result in real variable X.

#NameTypeDescription
1XDouble (ref)output

Result: stored in self (calling object)

Indexed: void Product(ref Double X, Int32 Index, Int32 Len)

Calculate the product for calling object elements [Index]..[Index+Len-1] and store the result in real variable X.

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

Result: stored in self (calling object)

Remarks:

An exception is raised if array borders are overrun or underrun.