NAME

scl_prd -- create unit to compute scalar product

PROTOTYPE

unitptr scl_prd( int n, unitptr dest)

ARGUMENTS

int n
dimensionality of input vectors
unitptr dest
host unit for newly created instance

RETURN VALUE:

unitptr u:
pointer to newly created unit

INTERFACE OF CREATED UNIT:

X_in[n]:
(input field 0) first input vector
Y_in[n]:
(input field 1) second input vector
X_out[1]:
(output field 0) scalar product of input vectors

DESCRIPTION:

Creates a unit with two input fields of n pins and one scalar output field. The created unit becomes a subunit of unit dest and computes the scalar product of its two inputs. If n is specified as a negative integer, the input fields will be created as packed fields with ABS(n) pins.

FILE:

nst_math

SEE ALSO:

cos_angle

FILE

/local/homes/rhaschke/nst7/man/../o.linx86_64//../foldersrc/nst_math.c