Domains Version 1.0
|
Description
|
|
•
|
Domains is a tool for developing code for complicated algorithms. The computational facilities offered by Domains differ from Maple in that you can parametrize a domain, for example, a polynomial or matrix ring, by the coefficient ring. This means that the code is more general as it will work in principle for any coefficient ring.
|
•
|
When computing in Domains, you first construct a domain of computation. For example, if you want to compute univariate polynomials with rational coefficients, first create the domain as follows
|
>
|
P := DenseUnivariatePolynomial(Q, x):
|
•
|
To use Domains interactively, you must first load it into Maple using with(Domains);
|
|
This also assigns the variables Z and Q to the domain of integers and rationals respectively, by executing
|
|
and defines many standard abbreviations for the domains known to Domains. For more information, see Domains/domain. Having defined the integers Z, you can compute the remainder of two integers m and n by doing
|
|
Consider another example. Suppose you have implemented Gaussian elimination to solve a linear system of equations over a field . Domains allows you to parametrize your subroutine by so that your routine works for all fields, not just the field of rational numbers that you may have envisioned when writing the routine. This is accomplished by grouping all operations in a ring or a field into a datastructure called a domain. In Domains, a domain is a Maple table of operations. For more details on domains and a list of known domains, see Domains/domain.
|
|
|
Coding
|
|
•
|
Coding with the Domains tool is quite straightforward, although you must package-call every operation.(See Domains/example.) For an example of how to code a simple function that computes with values of a domain, see Domains/coding.
|
|
Coding domains is somewhat more difficult and also cumbersome because nested lexical scopes and closures are not supported in Maple and must be simulated. It is recommended that you study the code of existing domains.
|
•
|
Before using Domains, read the help file Domains/example to see a Domains sample session.
|
|
|
Acknowledgements
|
|
•
|
Some of the main ideas behind Domains come from the AXIOM system, which was formerly called Scratchpad II. AXIOM also has the notion of parametrized types which it calls domains. The author of Domains would like to acknowledge the use of the primary idea behind AXIOM, namely that of passing as a parameter a collection of functions as a single unit, which the authors of AXIOM have termed a domain.
|
|
|