ndd_create_empty, ndd_create_empty_lsdf, ndd_create_empty_msdf


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

Synopsis

#include "lash-ndd.h"

ndd *ndd_create_empty(uint1 r, uint4 n, int msdf);
ndd *ndd_create_empty_lsdf(uint1 r, uint4 n);
ndd *ndd_create_empty_msdf(uint1 r, uint4 n);

Description

The function ndd_create_empty creates a new NDD representing the empty set. The numeration base is r, and the dimension of the set is n. The vectors are read most significant digit first if msdf is different from zero, and least significant digit first otherwise.

The macros ndd_create_empty_lsdf and ndd_create_empty_msdf can be used to create NDDs operating in a fixed direction.

Return values

In the case of success, these function and macros return a pointer to a newly allocated NDD. In the case of an error, they return a NULL pointer and set lash_errno.

Diagnostics

LASH_ERR_NOT_INIT
The package has not been initialized.
LASH_ERR_NO_MEM
Insufficient memory.
LASH_ERR_BAD_VALUE
Invalid base (the base must be at least equal to 2).

See also

ndd_free

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