42int main (
int argc,
char* argv[])
51 int column_weight = 0;
58 while ( ( c = getopt ( argc, argv,
"ac:f:hk:m:rs:")) != -1 ) {
63 fprintf (stderr,
"Only one of the options 'a' 'r' can be chosen.\n" );
69 column_weight = atoi ( optarg );
72 sprintf(fname,
"%s", optarg );
86 fprintf (stderr,
"Only one of the options 'a' 'r' can be chosen.\n" );
92 seed = atoi ( optarg );
95 if ( optopt ==
'c' || optopt ==
'k' || optopt ==
'm' )
96 fprintf ( stderr,
"Option -%c requires an argument.\n", optopt);
98 fprintf ( stderr,
"Unknown option character '\\x%x'.\n", optopt);
106 if ( ! ( k > 0 && m > 0 && column_weight > 0 && (random > 0 || rfc > 0) ) )
int generate_ldgm_matrix(char *fname, unsigned int k, unsigned int m, unsigned int column_weight, unsigned int seed, unsigned int extend_rows)