ndd_interleave_z


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

Synopsis

#include "lash-ndd.h"

ndd *ndd_interleave_z(ndd *nd, uint4 nl, uint4 nr);

Description

This function takes as arguments an NDD *nd representing a set S of dimension n as well as two integers nl and nr. Only one of these two integers may be different from zero, and this nonzero integer (if any) must divide n.

If nl is different from zero, then the function computes an NDD representing the set of all the vectors of dimension n(nl+1)/nl of the form (x1, x2, ..., xnl, y1, xnl+1, xnl+2, ..., x2nl, y2, ..., xn-nl+1, xn-nl+2, ..., xn, yn/nl), where (x1, x2, ..., xn) is a vector in S, and (y1, y2, ..., yn/nl) is arbitrary.

If nr is different from zero, then the function computes an NDD representing the set of all the vectors of dimension n(nr+1)/nr of the form (y1, x1, x2, ..., xnr, y2, xnr+1, xnr+2, ..., x2nr, ..., yn/nr, xn-nr+1, xn-nr+2, ..., xn), where (x1, x2, ..., xn) is a vector in S, and (y1, y2, ..., yn/nr) is arbitrary.

This function does not modify *nd.

Return values

In the case of success, the 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_BAD_VALUE
Bad parameters.
LASH_ERR_NOT_IMPL
Not yet implemented for non-serial NDDs.
LASH_ERR_NO_MEM
Not enough memory.
LASH_ERR_CORRUPT
Corrupt NDD.

See also

ndd_projection, ndd_product.

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