# RSL_prune_...

### Synopsis

#include "rsl.h"
Ray *RSL_prune_ray(Ray *ray);
Sweep *RSL_prune_sweep(Sweep *s);
Volume *RSL_prune_volume(Volume *v);
Radar *RSL_prune_radar(Radar *radar);

###

Description

These routines eliminates dataless substructures. A search is conducted for any substructures that contain only header information and, when found, are set to NULL. During the initial allocation step for ingest of a data format, substructure header information is minimially filled. It is not generally known if, for instance, a volume is NULL until it can be determined if there have been no rays assigned to it. In such a case, all sweep pointers have been allocated but no ray pointers assigned. Pruning this volume will result in setting the volume to NULL. A ray is pruned if h.nbins is 0. A sweep is pruned if h.nrays is 0. A volume is pruned if h.nsweeps is 0. A radar is pruned if h.nvolumes is 0.

### Return value

Upon successful completion, a pointer to the appropriate structure is returned. Otherwise, a NULL pointer is returned.

### See also

RSL_new_radar, RSL_new_volume, RSL_new_sweep, RSL_new_ray,
RSL_copy_volume, RSL_copy_sweep, RSL_copy_ray

Author: John H. Merritt