Procedure from library decodegb.lib (see decodegb_lib).
Usage:
mindist (check, q); check matrix, q int
- check is a check matrix,
- q is the field size
Return:
minimum distance of the code
Example:
LIB "decodegb.lib";
//determine a minimum distance for a [7,3] binary code
int q=8; int n=7; int redun=4; int t=redun+1;
ring r=(q,a),x,dp;
//generate random check matrix
matrix h=randomCheck(redun,n,1);
print(h);
==> 0,1,0,1,0,0,0,
==> 0,0,1,0,1,0,0,
==> 1,1,0,0,0,1,0,
==> 1,1,1,0,0,0,1
int l=mindist(h);
l;
==> 3