Container Data Types and Computations

The four container types supported by GrGen (set, map, array and deque) share a lot of conceptual similarities and can be accessed in a similar way. The table below lists the types and their descriptions.

The different types of containers

set
< T >
A (mathematical) set of type T, where T may be an enumeration type or one of the primitive types; it may even be a node or edge or graph type, then we speak of storages.
map
< S, T >
A (mathematical) map from type S to type T, where S and T may be enumeration types or one of the primitive types; it may even be a node or edge or graph type, then we speak of storages.
array
< T >
An array of type T, where T may be an enumeration type or one of the primitive types; it may even be a node or edge or graph type, then we speak of storages. Shares some similarities with map< int, T >.
deque
< T >
A deque of type T, where T may be an enumeration type or one of the primitive types; it may even be a node or edge or graph type, then we speak of storages. Shares some similarities with array< T >.

How to operate with container types

Containers support multiple methods to update them: add to add an element to it, rem to remove an element from it, and clear to remove all elements from it. Furthermore, they support multiple methods to query them: size to return the count of elements in the container, empty to return whether it is empty or not and peek to return the last or a specific element from it.

For every type we will add articles about its possible operations:

For deque type operations you can check out the GrGen manual (please search for the document with your preferred search engine) or just request the article in a comment below 🙂 .

Was this article helpful?

Related Articles