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/aggcat.spad.pamphlet | |
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/aggcat.spad.pamphlet')
-rw-r--r-- | src/algebra/aggcat.spad.pamphlet | 9 |
1 files changed, 3 insertions, 6 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!: (%,%) -> % |