ClassesClasses | | Operators

tuple_multtuple_multTupleMultTupleMult (Operator)

Name

tuple_multtuple_multTupleMultTupleMult — Multiply two tuples.

Signature

tuple_mult( : : P1, P2 : Prod)

Herror tuple_mult(double P1, double P2, double* Prod)

Herror T_tuple_mult(const Htuple P1, const Htuple P2, Htuple* Prod)

void TupleMult(const HTuple& P1, const HTuple& P2, HTuple* Prod)

HTuple HTuple::TupleMult(const HTuple& P2) const

static void HOperatorSet.TupleMult(HTuple p1, HTuple p2, out HTuple prod)

HTuple HTuple.TupleMult(HTuple p2)

Description

tuple_multtuple_multTupleMultTupleMultTupleMult computes the product of the input tuples P1P1P1P1p1 and P2P2P2P2p2. If both tuples have the same length the corresponding elements of both tuples are multiplied. Otherwise, either P1P1P1P1p1 or P2P2P2P2p2 must have length 1. In this case, the multiplication is performed for each element of the longer tuple with the single element of the other tuple. If two integer numbers are multiplied, the result is again an integer number. If one of the operands is a floating point number, the result is a floating point number. The multiplication of strings is not allowed.

Exception: Empty input tuples

If either or both of the input tuples are empty, the operator returns an empty tuple.

HDevelop In-line Operation

HDevelop provides an in-line operation for tuple_multtuple_multTupleMultTupleMultTupleMult, which can be used in an expression in the following syntax:

Prod := P1 * P2

Execution Information

Parameters

P1P1P1P1p1 (input_control)  number(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Input tuple 1.

P2P2P2P2p2 (input_control)  number(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Input tuple 2.

ProdProdProdProdprod (output_control)  number(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Product of the input tuples.

Alternatives

tuple_divtuple_divTupleDivTupleDivTupleDiv

Module

Foundation


ClassesClasses | | Operators