next | previous | forward | backward | up | top | index | toc | Macaulay2 website
ThreadedGB :: cleanUp

cleanUp -- extract a matrix from values of a hash table after deleting null values

Synopsis

Description

This simple function just returns the Groebner basis computed with threaded GB in the expected Macaulay2 format, so that further computation are one step easier to set up.

The function works on any object that is of type HashTable, because it simply removes null values and returns the remaining values a entries of a matrix. However, the usage intended is when the hash table is the output of a run of tgb.

i1 : R = ZZ/101[a,b,c];
i2 : T = reduce tgb( ideal "abc+c2,ab2-b3c+ac,b2",2)

o2 = HashTable{(((0-1)-0)-0) => null}
               ((0-1)-0) => null
                             2
               ((1-2)-0) => c
               (0-1) => null
               (0-2) => null
               (1-2) => a*c
               0 => null
               1 => null
                     2
               2 => b

o2 : HashTable
i3 : cleanUp T

o3 = | b2 c2 ac |

             1       3
o3 : Matrix R  <--- R

Ways to use cleanUp :

For the programmer

The object cleanUp is a method function.