RepairBinaryMatrix() | { | // Let be the th row vector of , that is, . | // Let be the identity matrix, where . | ; | ; | ; | for each , // use the process of Gauss-Jordan elimination | if and is not spanned by then | ; | ; | // Then, becomes the set of maximal linearly-independent row vectors. | ; | for each , | if is not spanned by then | ; | for each | any element in ; | ; | ; // repairing | return ; | } |
|