![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
As an example of using me, consider implenting a Dictionary whose elements are indexed. The domain would be a SequenceableCollection with n elements, the map a Dictionary associating each key to an index in the domain. To access by key, to perform enumeration, etc. you would ask an instance of me; to access by index, you would access the domain directly.
Another idea could be to implement row access or column access to a matrix implemented as a single n*m Array: the Array would be the domain, while the map would be an Interval.
1.105.1 MappedCollection class: instance creation (class) 1.105.2 MappedCollection: basic (instance)
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |