Previous Page Next Page Contents

Pref::keepOrder -- order of terms in sum outputs

Introduction

Pref::keepOrder influences the output order of terms in sums.

Call(s)

Pref::keepOrder(Always)
Pref::keepOrder(DomainsOnly)
Pref::keepOrder(System)
Pref::keepOrder(NIL)
Pref::keepOrder()

Options

Always - the output always corresponds to the internal order
DomainsOnly - only polynomials and domain elements are printed in their internal order
System - the output system always decides the output order

Returns

the previously defined value: Always, DomainsOnly, or System.

Related Functions

DOM_POLY, Dom::MultivariatePolynomial, Dom::Polynomial, Dom::UnivariatePolynomial, print

Details

Option: Always

Option: DomainsOnly

Option: System

Example 1

Here we create a domain element e, an expression f, and a polynomial p containing sums. With the default setting DomainsOnly, only the output of the expression f is not in the internal order:

>> d := newDomain("d"):  d::print := x -> extop(x):
   e := new(d, b - a):  f := b - a:  p := poly(1 - x):
   e, f, p
                    - a + b, b - a, poly(- x + 1, [x])

With the setting Always, e, f, and p are all printed in the internal order:

>> Pref::keepOrder(Always):
   e, f, p
                   - a + b, - a + b, poly(- x + 1, [x])

With the setting System, the output order differs from the internal ordering for e, f, and p:

>> Pref::keepOrder(System):
   e, f, p
                      b - a, b - a, poly(1 - x, [x])

Pref::keepOrder(NIL) restores the default state; Pref::keepOrder() returns the current setting:

>> Pref::keepOrder(NIL):  Pref::keepOrder()
                                DomainsOnly

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000