Skip to content

Catalan

Billy edited this page Feb 6, 2020 · 1 revision

A Catalan family is a Free Magma on one generator.

Implementing A Catalan Family

New Catalan families can be added to this project by writing a subclass of the Catalan class, provided in catalan.py. A Catalan family must provide the following static functions:

  • generator() - returns the generator object
  • product(fst,snd) - returns the product fst * snd
  • factorise(obj) - returns the unique factorisation obj = fst * snd

Optional functions

The implementation of the following functions is encouraged but not essential

  • direct_norm(obj) - calculates the norm of the object without recursion (using factorise)

Clone this wiki locally