Next: , Previous: bpipe_matrix_new_va, Up: Utility Functions


A.4.16 bpipe_matrix_squeeze

remove all high order singleton dimensions

Synopsis

     #include <bpipe/bpipe.h>
     
     
     
BPMatrix *bpipe_matrix_squeeze(BPMatrix *matrix);

Parameters

BPMatrix *matrix
Not Documented.

Description

This routine returns a copy of the passed matrix with all high order dimensions of extent one removed. For example, ‘[1][2][3][1]’ becomes ‘[1][2][3]’.

Returns

Upon successful completion a pointer to the new matrix is returned. Upon error bpipe_errno is set and NULL is returned.

Errors

Upon error bpipe_errno is set to one of the following errors:

BPENOMEM
a memory allocation failed