"> ">
Site hosted by Angelfire.com: Build your free website today!

HIRSCHBERG'S DOMAIN


Matrix Compression Techniques
    These are sparse parser table compression techniques. I've modified it to be used
in matrices. These are the pseudocodes ! not the programs!

Graph coloring scheme

for i=0 to m-1
            for j =0 to n-1
                    if T[i][j] == insignificant
                            sigmap[i][j] = 0
                    else
                            sigmap[i][j] = 1
    
    color = 1
    for i=0 to m-1
            for i2=0 to m-1
                    for j=0 to n-1
                            if T[i][j] == T[i2][j] && T[i][j] != insignificant && T[i2][j] != insignificant
                                    f = 1
                            else
                                    f = 0
                                    rowmap[i2] = color
                    if f == 1
                            if rowmap[i] == color
                                    rowmap[i2] = color-1
                                    for j=0 to n-1
                                            newT[rowmap[i2]][j] = T[i][j]
                            else
                                    rowmap[i2] = color
                                    for j=0 to  n-1
                                            newT[rowmap[i2]][j] = T[i][j]
                    else
                    if f == 0
                            color++
                            rowmap[i2] = color
                            for j=0 to n-1
                                    newT[rowmap[i2]][j] = T[i][j]
    
    
    for j=0 to n-1
            for j2=0 to n-1
                    for i=0 to m-1
                            if T[i][j] == T[i][j2] && T[i][j] != insignificant && T[i][j2] != insignificant
                                    f = 1
                            else
                                    f = 0
                                    columnmap[j2] = color
                    if f == 1
                            if columnmap[j] == color
                                    columnmap[j2] = color-1
                                    for i=0 to m-1
                                            value[columnmap[i]][j2] = T[i][j]
                            else
                                    columnmap[j2] = color
                       hirschberg/