DOT_PRODUCT (vector-a, vector-b)
Class: Transformational function - Generic
The "vector"s are rank-one arrays of integer, real, complex, or
logical type.
The result is a scalar; its type depends on "vector"s.
If "vector-a" is of type integer or real, the result value is SUM
(vector-a * vector-b).
If "vector-a" is of type complex, the result value is SUM (CONJG
(vector-a) * vector-b).
If "vector-a" is of type logical, the result has the value ANY
(vector-a .AND. vector-b).
If either rank-one array has size zero, the result is zero if the
array is of numeric type, and false if the array is of logical
type.
Examples:
DOT_PRODUCT ((/1, 2, 3/), (/3, 4, 5/)) has the value 26 (calculated
as follows:
((1 x 3) + (2 x 4) + (3 x 5)) = 26)
DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), ((1.0,
4.0) /))) has the value (17.0, 4.0).
DOT_PRODUCT ((/ .TRUE., .FALSE. /), (/ .FALSE., .TRUE. /)) has
the value false.