NAME

thr_vec - create unit that threshholds a vector

PROTOTYPE

unitptr thr_vec( int n, float *a, unitptr dest)

ARGUMENTS

int n
dimensionality of input vector
float *a
pointer to threshold value
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) input vector
X_out[n]:
(output field 0) output vector

EXECUTION:

X_out[] = X_in[] > (*a) ? X_in[] : 0

DESCRIPTION:

Creates a unit with one input field and one output field of n pins each. The created unit becomes a subunit of unit dest. The components of the output vector computed by a call to exec are obtained by elementwise thresholding of the input vector with the specified threshold value (*a). If n is specified as a negative integer, all fields the number of pins of which is specified by n are created as packed fields with ABS(n) pins.

FILE:

nst_math

FILE

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