14 #ifndef INCLUDED_utility_integer_mapping_hh
15 #define INCLUDED_utility_integer_mapping_hh
22 #include <platform/types.hh>
void set_source_size(platform::Size)
Required before the first call to set_next_correspondence may be called. The size of the source enume...
virtual ~subset_mapping()
platform::Size s2d(platform::Size source_id) const
Map from the id of an element in source enumeration to an id in the the destination enumeration...
subset_mapping & operator=(subset_mapping const &rhs)
ReferenceCount base class – dispatch class.
platform::Size d2s(platform::Size destination_id) const
Map from the id of an element in the destination enumeration to an id in the source enumeration...
void reserve_destination_size(platform::Size)
If you know the size of the destination enumeration, then you can save some under-the-hood vector res...
bool source_id_is_mapped(platform::Size source_id) const
platform::Size source_size() const
The number of elements in the source enumeration.
void set_next_correspondence(platform::Size source_id)
Inform the mapping of the next source-enumeration id that should be mapped to a destination-enumerati...
static platform::Size const UNMAPPED
utility::pointer::ReferenceCount parent
utility::vector1< platform::Size > dst_2_src_
Base class for reference-counted polymorphic classes.
platform::Size destination_size() const
The number of elements in the destination enumeration – this represents the number of calls that hav...
utility::vector1< platform::Size > src_2_dst_
vector1: std::vector with 1-based indexing
This class handles the bookeeping to map between a set of integer ids in the "source" enumeration to ...