Application Finite Domain Dual Types

Given a type with dual index domains, in particular sequential numbers and character strings, and where we wish to lookup using either domain, so that there are two useful values for id(), the sequence and hash numbers, the Dual class template provides a cyclical wrapping that:

Note that the template type T must have a data member named 'name' itself having member function id(). The type T is typically an identifier or string.

Although the finite domains are the common case of dual types, the Dual template is also used for the Relation class.

Bill Pippin 2010-01-14