Mapping
Relational functions mapping
syntax
- mapping(SrcUnit, DstUnit)
definition
mapping(SrcUnit, DstUnit) results in a relation with the Index numbers of the Domain unit DstUnit. The resulting Attribute has as Values unit DstUnit and as domain unit SrcUnit.
description
mapping(SrcUnit, DstUnit) is equivalent with Convert(Id (SrcUnit), DstUnit), but requires less memory.
applies to
- SrcUnit, DstUnit units with value types of the group CanBeDomainUnit
since version
7.119
example
unit<uint32> RegionSrc: nrofrows = 5;
unit<uint32> RegionDst: nrofrows = 5;
attribute<RegionDst> RegionDst_rel (RegionSrc) := mapping(RegionSrc, RegionDst);
| RegionDst_rel |
|---|
| 0 |
| 1 |
| 2 |
| 3 |
| 4 |
domain RegionSrc, nr of rows = 5