iMPaCT try f#‎ > ‎

matrix2

let eliminateRow(matrix : float [][], rowNum : int, d : int) =
    matrix.[rowNum] <- vectorAdd(matrix.[rowNum], scalarMult(matrix.[d], -matrix.[rowNum].[d]))

let clearCol(matrix : float[][], d : int) =
    scaleRow(matrix, d)
    for rowNum in 0 .. matrix.Length-1 do
        if not (rowNum = d) then
            eliminateRow(matrix, rowNum, d)
Comments