function [d,a ] =  generate(a)

if( a.seed>0) RandStream.setDefaultStream(RandStream('mcg16807', 'Seed',a.seed));   end;

Z=unifrnd(-a.coef_r,a.coef_r,a.n,a.dim);
Y=sign(prod(double(Z(:,1:a.corrdim)>=-a.output_r & Z(:,1:a.corrdim)<=a.output_r),2)-0.5);

d=data(Z,Y);
