ndd_create_eq2, ndd_create_eq2_lsdf, ndd_create_eq2_msdf


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

Synopsis

#include "lash-ndd.h"

ndd *ndd_create_eq2_lsdf(uint1 r);
ndd *ndd_create_eq2_msdf(uint1 r);
ndd *ndd_create_eq2(uint1 r);

Description

The functions ndd_create_eq2_lsdf and ndd_create_eq2_msdf create a new NDD representing the set of all the integers vectors of dimension 2 whose components are equal, i.e., the set
{ (x, x) | x in Z }

The numeration base is r. The NDDs created by ndd_create_eq2_msdf operate most significant digit first, and those created by ndd_create_eq2_lsdf least significant digit first.

The macro ndd_create_eq2 can be used for creating an NDD operating in the default direction.

Return values

In the case of success, these functions and macro 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 ]