Polynomial inheritance tree

Previous: Hierarchy overview Up: Hierarchy overview Next: Boite inheritance tree

Polynomial inheritance tree

The inheritance of the polynomial objects is somewhat more complex, as figure indicates.

The solution to making each atom unique can be seen shared in on the left hand side of the graph where prototypical and objects inherit from the scalar object.

Multiple inheritance is used to gather together behaviour common to operators that are have infix representation. Note, however, that rational and exponent are specializations of binop while addition and product are specializations of naryop. Further, rational does not share its graphical representation with any other types, and it overrides the graphical representation provided by infixop, but retains the textual representation.

The poly mix-in provides the double dispatching required when actually dealing with various objects. vector at this moment is just a placeholder and provides no actual functionality. The connection to poly may be moved from scalar upwards to vector when more specialisations of vector are created (e.g. matrices, functions, wave-functions, etc...)

mcr@ccs.carleton.ca