[top][index]
search for:

merge -- merge hash tables

Synopsis:

  • Usage: z = merge(x,y,g)
  • Input:
  • x: a hash table
  • y: a hash table
  • g: a function of two variables to be used to combine a value of x with a value of y when the corresponding keys coincide
  • Output:
  • z: a new hash table whose keys are the keys occuring in x or in y; the same values are used, except that if if a key k occurs in both arguments, then g(x#k,y#k) is used instead.
  • If x and y have the same class and parent, then the z will, too.

    This function is useful for multiplying monomials or adding polynomials.

    See also:

  • combine -- combine hash tables
  • Ways to use merge :

  • merge(HashTable,HashTable,Function)

  • [top][index]
    search for: