axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Re: [Axiom-developer] about Expression Integer

 From: Gabriel Dos Reis Subject: Re: [Axiom-developer] about Expression Integer Date: 21 Feb 2006 12:57:12 +0100

```Ralf Hemmecke <address@hidden> writes:

| On 02/20/2006 10:02 PM, Gabriel Dos Reis wrote:
| > Ralf Hemmecke <address@hidden> writes:
| > | Hmm, do you call the following object-oriented?
| > Yes.
| > | (That code appears in libalgebra distributed with Aldor and it
| > | basically provides a generic function that given a function "f: R ->
| > | S" returns a function "map(f)" of type "RX -> SX" that applies "f" on
| > | the coefficients of a univariate polynomial.)
| > | | UnivariateFreeRing2(
| > |      R : Join(ArithmeticType, ExpressionType),
| > |      RX: UnivariateFreeRing R,
| > |      S : Join(ArithmeticType, ExpressionType),
| > |      SX: UnivariateFreeRing S
| > | ): with {
| > |   map: (R -> S) -> RX -> SX;
| > | } == add {
| > |   map(f:R -> S)(p:RX):SX == {
| > |           q:SX := 0;
| > |           for term in p repeat {
| > |                   (c, n) := term;
| > |                   q := add!(q, f c, n);
| > |           }
| > |           q;
| > |   }
| > | }
| > | | What is the class and what are the methods?
| > The class is the collection of "things" that you can "pretend" to be
| > univariate polynomials.
|
| Oh, I think that is wrong.

I don't think so.

| The "univariate polynomials" come as a
| parameter and have nothing to do with UnivariateFreeRing2.

Not quite.  "Univariate polynomial" is a bundle of methods, whether it
is a parameter database or a global database is largely irrelevant.
What is relevant is the structure it exposes both interface and
overridable functions.

-- Gaby

```

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]