The Container Grid Function concept refines the Mutable Grid Function concept. A Container Grid Function can be created and filled with values by a client, much like a ordinary container. This of particular importance for algorithms needing temporary storage, such as boolean flags on grid elements.
Name | Expression | Type requirements | return type |
Default construction | F f(); | ||
Construction from grid | F f(g); | ||
Construction and initialization | F f(g,t); | ||
Binding to grid | f.set_grid(g); | ||
Name | Expression | Precondition | Semantics | Postcondition |
Default construction | F f(); | default construct f |
f is unbound
write access is an error read access is an error | |
construction from grid | F f(g); | construct and bind f to g |
f is bound to g
write access is allowed read access is undefined | |
construction and initialization | F f(g,t); | construct and bind f to g, initialize all values to t |
f is bound to g
write access is allowed f(e) is equal to t for all elements e in the range of f. | |
Binding to grid | f.set_grid(g); | f is unbound | bind f to g |
f is bound to g
write access is allowed, read access is undefined |