#include "cvec.h"
cvec_t * new_cvec( uint_t length) {
+ if ((sint_t)length <= 0) {
+ return NULL;
+ }
cvec_t * s = AUBIO_NEW(cvec_t);
s->length = length/2 + 1;
s->norm = AUBIO_ARRAY(smpl_t,s->length);
#include "fmat.h"
fmat_t * new_fmat (uint_t length, uint_t height) {
+ if ((sint_t)length <= 0 || (sint_t)height <= 0 ) {
+ return NULL;
+ }
fmat_t * s = AUBIO_NEW(fmat_t);
uint_t i,j;
s->height = height;
#include "fvec.h"
fvec_t * new_fvec( uint_t length) {
+ if ((sint_t)length <= 0) {
+ return NULL;
+ }
fvec_t * s = AUBIO_NEW(fvec_t);
s->length = length;
s->data = AUBIO_ARRAY(smpl_t, s->length);
#include "lvec.h"
lvec_t * new_lvec( uint_t length) {
+ if ((sint_t)length <= 0) {
+ return NULL;
+ }
lvec_t * s = AUBIO_NEW(lvec_t);
s->length = length;
s->data = AUBIO_ARRAY(lsmp_t, s->length);