Subset relation representation types¶

SAF_SubsetRelRep is a collection of related C preprocessor symbols defined in SAFrelrep.h.

Synopsis:

SAF_HSLAB: Indicates a hyperslab which is stored as 3 N-tuples; N indices for the start value in each of the N dimensions, followed by N indices for the count in each of the N dimensions followed by N indices for stride in each of the N dimensions. Use a stride of 1 for each of the N dimensions if you do not have a hypersample.

SAF_TUPLES: Indicates a list of N-tuples. Each N-tuple identifies one member of an N dimensionally indexed collection.

SAF_TOTALITY: Indicates that all members of the collection are involved–which probably also means the subset is equal to the superset. Perhaps a better name for this value would be SAF__IDENTITY. However, that is being used elsewhere. Typically, this value is only ever used during a saf_write_field call.

Description: The subset relationship between a superset and a subset can take many forms. In theory, the subset relation identifies every member of the superset that is in the subset. In practice, depending on the nature of the indexing schemes used to identify members of collections on the superset and subset, there are a number of different ways a client may represent a subset relationship. In an unstructured gridded code, the natural thing to do is simply enumerate each member of the superset in the subset by listing them. In a structured gridded code, the natural approach is to specify a hyperslab (or hypersample). Another natural approach for a structured gridded code is to specify a chain-code boundary where everything surrounded by the boundary is in the subset. This latter form is not yet supported by SAF.

Issues: These representational issues raise a more fundamental question. Is the act of defining a subset one of enumerating every point of the superset that is in the subset or can it also be achieved by enumerating a boundary in the superset where everything inside the boundary is in the subset? In other words, do we deal only with solid representations or both solid and boundary representations for sets?

We do not support a list of hyperslabs (hypersamples) due to the confusion of this representation with the union of a number of individual sets which are hyperslab subsets of some parent superset.

See Also:

  • Datatypes: Introduction for current chapter