/* The purpose of this util is just to finish packaging the
description into a static codebook. It used to count hits for a
histogram, but I've divorced that out to add some flexibility (it
- currently generates an equal probability codebook)
+ currently generates an equal probability codebook)
command line:
latticebuild description.vql
<n> <dim> <multiplicitavep> <sequentialp>
<value_0> <value_1> <value_2> ... <value_n-1>
-
+
a threshmap (or pigeonmap) struct is generated by latticehint;
there are fun tricks one can do with the threshmap and cascades,
but the utils don't know them...
fprintf(stderr,"Could not open input file %s\n",filename);
exit(1);
}
-
+
ptr=strrchr(filename,'.');
if(ptr){
*ptr='\0';
}
}
-
+
/* read the description */
line=get_line(in);
if(sscanf(line,"%d %d %d %d",&quantvals,&dim,&addmul,&sequencep)!=4){
reset_next_value();
line=setup_line(in);
- for(j=0;j<quantvals;j++){
+ for(j=0;j<quantvals;j++){
char *temp;
if(!line || sscanf(line,"%lf",quantlist+j)!=1){
fprintf(stderr,"Ran out of data on line 2 of description file\n");