NAME
euc_len - unit that computes euclidean length of vector
sqr_val - unit that computes square of norm of vector
PROTOTYPES
unitptr euc_len( int n, unitptr dest)
unitptr sqr_val( int n, unitptr dest)
ARGUMENTS
- int n
- dimensionality of input vector
- 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[1]:
- (output field 0) scalar output value
EXECUTION OF CREATED UNIT:
- X_out=||X_in||
- for euc_len
- X_out=X_in*X_in
- for sqr_val
DESCRIPTION:
Both routines create a unit with one input field of n pins
and one scalar output field. The created unit becomes a
subunit of unit dest. The computed value is the euclidean
length or its square , respectively, of the input vector.
If n is specified as a negative integer, the input
field will be created as packed fields with ABS(n) pins.
FILE:
nst_math
SEE ALSO:
dif_len, normalize_vec
FILE
/amnt/loge/users/nistaff02/nistaff/rhaschke/nst7/man/../o.linux//../foldersrc/nst_math.c