diff options
author | dos-reis <gdr@axiomatics.org> | 2013-05-18 02:11:08 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2013-05-18 02:11:08 +0000 |
commit | 003f78cdb3e973631cc141814a89b92275988aaf (patch) | |
tree | 35d634db37d1a3e06209dbc3cd89bef8d49a6d1b /src/algebra | |
parent | 681f30e8a2a60c506f1ad8c45fe182baf2ff51bf (diff) | |
download | open-axiom-003f78cdb3e973631cc141814a89b92275988aaf.tar.gz |
* algebra/attreg.spad.pamphlet (AttributeRegistry): Remove
shallowlyMutble.
* algebra/aggcat.spad.pamphlet (BagAggregate): Extend
ShallowlyMutableAggregate.
(ExtensibleLinearAggregate): Likewise.
* algebra/mset.spad.pamphlet (Multiset): Likewise.
* algebra/tree.spad.pamphlet (Tree): Likewise.
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/aggcat.spad.pamphlet | 9 | ||||
-rw-r--r-- | src/algebra/attreg.spad.pamphlet | 5 | ||||
-rw-r--r-- | src/algebra/mset.spad.pamphlet | 3 | ||||
-rw-r--r-- | src/algebra/tree.spad.pamphlet | 3 |
4 files changed, 5 insertions, 15 deletions
diff --git a/src/algebra/aggcat.spad.pamphlet b/src/algebra/aggcat.spad.pamphlet index baa4a420..77a0b829 100644 --- a/src/algebra/aggcat.spad.pamphlet +++ b/src/algebra/aggcat.spad.pamphlet @@ -338,9 +338,7 @@ import List ++ and where the order in which objects are inserted determines the order ++ of extraction. ++ Examples of bags are stacks, queues, and dequeues. -BagAggregate(S:Type): Category == HomogeneousAggregate S with - shallowlyMutable - ++ shallowlyMutable means that elements of bags may be destructively changed. +BagAggregate(S:Type): Category == ShallowlyMutableAggregate S with bag: List S -> % ++ bag([x,y,...,z]) creates a bag with elements x,y,...,z. extract!: % -> S @@ -2052,7 +2050,7 @@ import FiniteLinearAggregate ++ Insertion and deletion however is generally slow since an entirely new ++ data structure must be created for the result. OneDimensionalArrayAggregate(S:Type): Category == - FiniteLinearAggregate S with shallowlyMutable + Join(FiniteLinearAggregate S,ShallowlyMutableAggregate S) add parts x == [qelt(x, i) for i in minIndex x .. maxIndex x] sort!(f, a) == quickSort(f, a)$FiniteLinearAggregateSort(S, %) @@ -2318,8 +2316,7 @@ import Integer ++ concatenation efficient. However, access to elements of these ++ extensible aggregates is generally slow since access is made from the end. ++ See \spadtype{FlexibleArray} for an exception. -ExtensibleLinearAggregate(S:Type):Category == LinearAggregate S with - shallowlyMutable +ExtensibleLinearAggregate(S:Type):Category == Join(LinearAggregate S,ShallowlyMutableAggregate S) with concat!: (%,S) -> % ++ concat!(u,x) destructively adds element x to the end of u. concat!: (%,%) -> % diff --git a/src/algebra/attreg.spad.pamphlet b/src/algebra/attreg.spad.pamphlet index 97ecc7a2..8fd926b0 100644 --- a/src/algebra/attreg.spad.pamphlet +++ b/src/algebra/attreg.spad.pamphlet @@ -21,11 +21,6 @@ AttributeRegistry(): Category == with commutative("*") ++ \spad{commutative("*")} is true if it has an operation ++ \spad{"*": (D,D) -> D} which is commutative. - shallowlyMutable - ++ \spad{shallowlyMutable} is true if its values - ++ have immediate components that are updateable (mutable). - ++ Note: the properties of any component domain are irrevelant to the - ++ \spad{shallowlyMutable} proper. unitsKnown ++ \spad{unitsKnown} is true if a monoid (a multiplicative semigroup ++ with a 1) has \spad{unitsKnown} means that diff --git a/src/algebra/mset.spad.pamphlet b/src/algebra/mset.spad.pamphlet index 9d564ee9..e4dd72e7 100644 --- a/src/algebra/mset.spad.pamphlet +++ b/src/algebra/mset.spad.pamphlet @@ -23,8 +23,7 @@ ++ Examples: ++ References: ++ Description: A multiset is a set with multiplicities. -Multiset(S: SetCategory): Join(MultisetAggregate S,FiniteAggregate S) with - shallowlyMutable +Multiset(S: SetCategory): Join(MultisetAggregate S,FiniteAggregate S,ShallowlyMutableAggregate S) with multiset: () -> % ++ multiset()$D creates an empty multiset of domain D. multiset: S -> % diff --git a/src/algebra/tree.spad.pamphlet b/src/algebra/tree.spad.pamphlet index 985f6dc5..d3c10e91 100644 --- a/src/algebra/tree.spad.pamphlet +++ b/src/algebra/tree.spad.pamphlet @@ -30,8 +30,7 @@ import List ++ Each tree is either empty or else is a {\it node} consisting of a value and ++ a list of (sub)trees. Tree(S: SetCategory): T==C where - T== Join(RecursiveAggregate S,FiniteAggregate S) with - shallowlyMutable + T== Join(RecursiveAggregate S,FiniteAggregate S,ShallowlyMutableAggregate S) with tree: (S,List %) -> % ++ tree(nd,ls) creates a tree with value nd, and children ++ ls. |