indexed

File indexed.str
Author Martin Bravenboer <martin.bravenboer@gmail.com>
Since 0.11

Interface to ATerm's IndexedSets.




Statistics


General
Lines of code 201
Stratego
Module number 1 (100% documented)
Constructor number 1 (0% documented)
Overlay number 0
Strategy number 17 (100% documented)
Rule number 0
DynamicRule number 0



Constructor summary


IndexedSet(ATerm ) n/a indexed.str

Strategy summary


iset-add(Strategy on_old, ATerm elem) Adds elem to the set indexed.str
iset-add(ATerm elem) Ensures that elem is in the set indexed.str
iset-addlist(ATerm lst) Ensures that all elems in the specified list are in the set indexed.str
iset-clear Removes all elements from the set indexed.str
iset-contains(ATerm elem) Fails if elem is not in the set indexed.str
iset-destroy Releases all memory occupied by the set indexed.str
iset-elements Returns all elements of the set indexed.str
iset-eq(ATerm set2) Checks whether a set has equal contents as another indexed.str
iset-fixpoint(Strategy s) Applies s to the elements of a Set until it no more elements are added to this set indexed.str
iset-get-elem(ATerm index) Gets the element at index in the set indexed.str
iset-get-index(ATerm elem) Gets the index of elem in the set indexed.str
iset-isect(ATerm set2) Intersects a set with another indexed.str
iset-remove(ATerm elem) Removes elem from set indexed.str
iset-subset(ATerm set2) Checks whether one set is a subset of another indexed.str
iset-union(ATerm set2) Unites a set with another indexed.str
new-iset Creates a new set with default initial size and maximum load indexed.str
new-iset(ATerm initial_size, ATerm max_load) Creates a new set with specified initial size and maximum load indexed.str



Strategy details


ATerm iset-add(Strategy on_old, ATerm elem)
File indexed.str
Author unknown
Since unknown
 
Parameters
Strategy on_old Int -> a

Adds elem to the set.

If the elem is already in the set, then on_old is applied toits index.


type IndexedSet -> (Int | a )

 
ATerm iset-add(ATerm elem)
File indexed.str
Author unknown
Since unknown
 

Ensures that elem is in the set.


type IndexedSet -> IndexedSet

 
ATerm iset-addlist(ATerm lst)
File indexed.str
Author unknown
Since unknown
 

Ensures that all elems in the specified list are in the set.


type IndexedSet -> IndexedSet

 
ATerm iset-clear
File indexed.str
Author unknown
Since unknown
 

Removes all elements from the set.


type IndexedSet -> IndexedSet

 
ATerm iset-contains(ATerm elem)
File indexed.str
Author unknown
Since unknown
 

Fails if elem is not in the set.


type IndexedSet -> IndexedSet

 
ATerm iset-destroy
File indexed.str
Author unknown
Since unknown
 

Releases all memory occupied by the set.A destroyed set can no longer be used.


type IndexedSet -> IndexedSet

 
ATerm iset-elements
File indexed.str
Author unknown
Since unknown
 

Returns all elements of the set.


type IndexedSet(a) -> List(a)

 
ATerm iset-eq(ATerm set2)
File indexed.str
Author unknown
Since unknown
 
Parameters
ATerm set2 IndexedSet

Checks whether a set has equal contents as another.


type IndexedSet -> IndexedSet

 
ATerm iset-fixpoint(Strategy s)
File indexed.str
Author unknown
Since unknown
 
Parameters
Strategy s a -> List(a)

Applies s to the elements of a Set until it no more elements are added to this set.


type Set(A) -> Set(A)

 
ATerm iset-get-elem(ATerm index)
File indexed.str
Author unknown
Since unknown
 

Gets the element at index in the set.

Always provide a valid index: behaviour is undefined if the indexis not in the set.


type IndexedSet -> Int

 
ATerm iset-get-index(ATerm elem)
File indexed.str
Author unknown
Since unknown
 

Gets the index of elem in the set.

Fails if elem is not in the set.


type IndexedSet -> Int

 
ATerm iset-isect(ATerm set2)
File indexed.str
Author unknown
Since unknown
 
Parameters
ATerm set2 IndexedSet

Intersects a set with another.


type IndexedSet -> IndexedSet

 
ATerm iset-remove(ATerm elem)
File indexed.str
Author unknown
Since unknown
 

Removes elem from set.

If the elements is not in the set, then this strategy does not fail.


type IndexedSet -> IndexedSet

 
ATerm iset-subset(ATerm set2)
File indexed.str
Author unknown
Since unknown
 
Parameters
ATerm set2 IndexedSet

Checks whether one set is a subset of another.


type IndexedSet -> IndexedSet

 
ATerm iset-union(ATerm set2)
File indexed.str
Author unknown
Since unknown
 
Parameters
ATerm set2 IndexedSet

Unites a set with another.


type IndexedSet -> IndexedSet

 
ATerm new-iset
File indexed.str
Author unknown
Since unknown
 

Creates a new set with default initial size and maximum load.


type _ -> IndexedSet

 
ATerm new-iset(ATerm initial_size, ATerm max_load)
File indexed.str
Author unknown
Since unknown
 
Parameters
ATerm initial_size Int, Initial size of internal storage
ATerm max_load Int, 0-100.

Creates a new set with specified initial size and maximum load.


type _ -> IndexedSet