ndd_difference


[ Synopsis | Description | Return values | Diagnostics | See also | Back to the NDD package documentation ]

Synopsis

#include "lash-ndd.h"

ndd *ndd_difference(ndd *nd1, ndd *nd2);

Description

This function computes an NDD representing the difference between the sets represented by the two NDDs *nd1 and *nd2, i.e., the set of all the vectors that belong to the set represented by *nd1 and that do not belong to the set represented by *nd2. The two operand NDDs must use the same base, the same dimension, and operate in the same direction.

This function does not modify *nd1 or *nd2.

Return values

In the case of success, this function returns a pointer to a newly created NDD. In the case of an error, it returns a NULL pointer and sets lash_errno.

Diagnostics

LASH_ERR_NOT_INIT
The package has not been initialized.
LASH_ERR_BASE
Base mismatch.
LASH_ERR_DIMENSION
Dimension mismatch.
LASH_ERR_BAD_TYPE
Direction mismatch.
LASH_ERR_NO_MEM
Insufficient memory.
LASH_ERR_CORRUPT
Corrupt NDD.

See also

ndd_union, ndd_intersection

[ Synopsis | Description | Return values | Diagnostics | See also | Back to the NDD package documentation ]