Wiselib
Public Types | Public Member Functions
wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P > Class Template Reference

Basic neighborhood operations. More...

#include <localization_neighborhood.h>

List of all members.

Public Types

typedef OsModel_P OsModel
typedef node_id_t_P node_id_t
typedef NeighborInfo_P NeighborInfo
typedef NeighborInfo::NodeSet NodeSet
typedef NeighborInfo::DistanceMap DistanceMap
typedef NeighborInfoMap_P NeighborInfoMap
typedef NeighborInfoMap::iterator NeighborhoodIterator
typedef Arithmatic_P Arithmatic

Public Member Functions

NeighborInfoMap get_neighborhood (void)
construction / destruction
 LocalizationNeighborhood ()
 ~LocalizationNeighborhood ()
owner info
void set_source (node_id_t)
 Set the node this neighborhood belongs to.
node_id_t source (void)
add/update nodes to neighborhood
void update_anchor (node_id_t, Vec< Arithmatic >, Arithmatic=UNKNOWN_DISTANCE)
 Update an anchor with given data.
void update_neighbor (node_id_t, Arithmatic)
 Update a neighbor with given data.
void update_nneighbor (node_id_t, node_id_t, Arithmatic)
 Update a neighbor of a neighbor with given data, so that the neighbor's neighborhood is filled/updated.
void update_nneighbors (node_id_t, DistanceMap &)
 Update neighbors of a neighbor with given data, so that the neighbor's neighborhood is filled/updated.
reference nodes and sound-check
void set_ref_node (node_id_t, node_id_t)
 Set a reference node of a neighbor.
void update_ref_node (node_id_t, node_id_t)
 Set a reference node of a neighbor.
template<typename NodeList_P >
void update_ref_nodes (node_id_t node, const NodeList_P &nl)
 Set reference nodes of a neighbor.
NodeSet ref_nodes (void)
void add_sound (node_id_t)
 Add sound neighbor.
bool is_sound (void)
 To decide, whether the neighborhood is sound or not, the number of intersection of reference and sound nodes is taken.
information about neighborhood
bool has_anchor (node_id_t)
bool has_neighbor (node_id_t)
bool has_nneighbor (node_id_t, node_id_t)
bool has_valid_neighbor (node_id_t)
 This method checks, whether a neighbor exits or not, and is valid.
bool has_valid_nneighbor (node_id_t, node_id_t)
 This method checks, whether a neighbor of neighbor exits or not, and is valid.
distance information
Arithmatic neighbor_distance (node_id_t)
Arithmatic nneighbor_distance (node_id_t, node_id_t)
 Returns the distance between given neighbors.
DistanceMap neighbor_distance_map (void)
special information
int valid_anchor_cnt (void)
 This method count the number of valid anchors.
int anchor_cnt ()
 This method count the number of anchors, whether they are valid or not.
int confident_neighbor_cnt (void)
 This method count the number of confident neighbors.
Arithmatic avg_neighbor_confidence (void)
 This method computes the average confidence of all confident neighbors.
work on the neighborhood
void reassign_twins (Arithmatic)
 This method passes all pairs of neighbors and decide, whether they are twins or not on the basis of given measure, and set the second neighbor to a twin in positive cases.
iterators and general functions on neighboorhood
NeighborhoodIterator begin_neighborhood (void)
NeighborhoodIterator end_neighborhood (void)
size_t size (void)
NeighborhoodIterator find (node_id_t node)

Detailed Description

template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
class wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >

Basic neighborhood operations.

This class combines neighbors to a neighborhood. In addition to basic methods such like adding an anchor or neighbor, there are operations on the neighborhood like counting anchors or something alike.

At first, there are the above mentioned basic methods like adding/updating anchors or neighbors, methods for searching certain anchors/neighbors in the neighborhood, same with distances, and simply methods which return iterators.
To add more information to a neighbor, you have to direct access the LocalizationNeighborInfo via find_w() and resulting iterator.

Second there is a chance to decide, whether the neighborhood is sound or not. This means, that the received information is unique. The neighborhood is sound, if there are at least three/four valid anchors, for which the data is received by different neighbors. Moreover, e.g. the LocalizationIterLaterationModule does this, you can add so called sound neighbors, so that the intersection of unique anchors and sound nodes has to be greater or equal than three/four.
The sound nodes are stored in separate set

At last there are operations on the neighborhood. On the one hand the varying like reassign_twins(), on the other hand just const ones like valid_anchor_cnt() or confident_neighbor_cnt().


Member Typedef Documentation

template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
typedef Arithmatic_P wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::Arithmatic
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
typedef NeighborInfo::DistanceMap wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::DistanceMap
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
typedef NeighborInfoMap::iterator wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::NeighborhoodIterator
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
typedef NeighborInfo_P wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::NeighborInfo
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
typedef NeighborInfoMap_P wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::NeighborInfoMap
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
typedef node_id_t_P wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::node_id_t
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
typedef NeighborInfo::NodeSet wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::NodeSet
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
typedef OsModel_P wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::OsModel

Constructor & Destructor Documentation

template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::LocalizationNeighborhood ( )
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::~LocalizationNeighborhood ( )

Member Function Documentation

template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
void wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::add_sound ( node_id_t  node)

Add sound neighbor.

The sound nodes are stored in separate set.

template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
int wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::anchor_cnt ( )

This method count the number of anchors, whether they are valid or not.

Returns:
Number of anchors
See also:
valid_anchor_cnt(), LocalizationNeighborInfo::is_valid()
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::Arithmatic wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::avg_neighbor_confidence ( void  )

This method computes the average confidence of all confident neighbors.

Confident means, that there is a position and distance known, the neighbor is not a twin and has a confidence != 0.

Returns:
Average confidence of all confident neighbors
See also:
confident_neighbor_cnt(), LocalizationNeighborInfo::is_confident()
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
NeighborhoodIterator wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::begin_neighborhood ( void  ) [inline]
Returns:
writable iterator to begin of neighborhood
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
int wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::confident_neighbor_cnt ( void  )

This method count the number of confident neighbors.

Confident means, that there is a position and distance known, the neighbor is not a twin and has a confidence != 0.

Returns:
Number of confident neighbors
See also:
valid_anchor_cnt(), LocalizationNeighborInfo::is_confident()
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
NeighborhoodIterator wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::end_neighborhood ( void  ) [inline]
Returns:
writable iterator to end of neighborhood
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
NeighborhoodIterator wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::find ( node_id_t  node) [inline]
Parameters:
Nodeneighbor to search for
Returns:
writable iterator to given neighbor
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
NeighborInfoMap wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::get_neighborhood ( void  ) [inline]
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
bool wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::has_anchor ( node_id_t  node)
Parameters:
Nodeanchor to search for
Returns:
if neighbor exists and is an anchor
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
bool wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::has_neighbor ( node_id_t  node)
Parameters:
Nodeneighbor to search for
Returns:
if neighbor exists
See also:
has_valid_neighbor()
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
bool wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::has_nneighbor ( node_id_t  node,
node_id_t  neighbor 
)
Parameters:
Nodesource neighbor
Nodeneighbor of neighbor to search for
Returns:
if neighbor of neighbor exists
See also:
has_valid_nneighbor()
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
bool wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::has_valid_neighbor ( node_id_t  node)

This method checks, whether a neighbor exits or not, and is valid.

Unlike LocalizationNeighborInfo::is_valid valid in this case just means, that there exists a distance to this neighbor.

Parameters:
Nodeneighbor to search for
Returns:
if neighbor exists and is valid
See also:
has_neighbor()
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
bool wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::has_valid_nneighbor ( node_id_t  node,
node_id_t  neighbor 
)

This method checks, whether a neighbor of neighbor exits or not, and is valid.

Unlike LocalizationNeighborInfo::is_valid valid in this case just means, that there exists a distance of given neighbor to his neighbor.

Parameters:
Nodesource neighbor
Nodeneighbor of neighbor to search for
Returns:
if neighbor of neighbor exists and is valid
See also:
has_nneighbor()
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
bool wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::is_sound ( void  )

To decide, whether the neighborhood is sound or not, the number of intersection of reference and sound nodes is taken.

If this number is greater or eual than three/four, neighborhood is sound.

Returns:
true, if neighborhood is sound. false otherwise
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::Arithmatic wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::neighbor_distance ( node_id_t  node)
Parameters:
Nodeneighbor to search for
Returns:
Distance to given neighbor
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::DistanceMap wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::neighbor_distance_map ( void  )
Returns:
localization::DistanceMap of complete neighborhood
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::Arithmatic wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::nneighbor_distance ( node_id_t  node,
node_id_t  neighbor 
)

Returns the distance between given neighbors.

If both distances are known, the mean of both is returned. If none is known, UNKNOWN_DISTANCE is returned.

Parameters:
Nodesource neighbor
Nodeneighbor of neighbor to search for
Returns:
Distance from given neighbor to its neighbor
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
void wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::reassign_twins ( Arithmatic  twin_measure)

This method passes all pairs of neighbors and decide, whether they are twins or not on the basis of given measure, and set the second neighbor to a twin in positive cases.


The result is, that there is only one neighbor on one position in the neighborhood, which is not a twin.

Parameters:
ArithmaticMeasure to decide, whether a neighbor is near enough to be a twin
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::NodeSet wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::ref_nodes ( void  )
Returns:
Set of all reference nodes
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
void wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::set_ref_node ( node_id_t  node,
node_id_t  ref 
)

Set a reference node of a neighbor.

Old one(s) will be deleted and new one set.

Parameters:
Nodeneighbor to update
Nodereference node
See also:
update_ref_node(), update_ref_nodes()
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
void wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::set_source ( node_id_t  source)

Set the node this neighborhood belongs to.

Parameters:
Nodebelonging Node
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
size_t wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::size ( void  ) [inline]
Returns:
size of neighborhood
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
node_id_t_P wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::source ( void  )
Returns:
Node this neighborhood belongs to
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
void wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::update_anchor ( node_id_t  node,
Vec< Arithmatic pos,
Arithmatic  distance = UNKNOWN_DISTANCE 
)

Update an anchor with given data.

If the anchor does not exist, it is created and inserted in the neighborhood.

Parameters:
Nodeanchor to insert/update
Vecposition of anchor
Arithmaticdistance to anchor. if distance is not known, the default value is localization::UNKNOWN_DISTANCE
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
void wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::update_neighbor ( node_id_t  node,
Arithmatic  distance 
)

Update a neighbor with given data.

If the neighbor does not exist, it is created and inserted in the neighborhood.

Parameters:
Nodeneighbor to insert/update
Arithmaticdistance to neighbor
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
void wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::update_nneighbor ( node_id_t  node,
node_id_t  neighbor,
Arithmatic  distance 
)

Update a neighbor of a neighbor with given data, so that the neighbor's neighborhood is filled/updated.

If both Nodes exists in source neighborhood, the update happens in both ways.

Parameters:
Nodeneighbor to update
Nodeneighbor of above mentioned neighbor
Arithmaticdistance between Nodes
See also:
update_nneighbors()
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
void wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::update_nneighbors ( node_id_t  node,
DistanceMap dm 
)

Update neighbors of a neighbor with given data, so that the neighbor's neighborhood is filled/updated.

Parameters:
Nodeneighbor to update
localization::DistanceMapneighbors of above mentioned neighbor
See also:
update_nneighbor()
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
void wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::update_ref_node ( node_id_t  node,
node_id_t  ref 
)

Set a reference node of a neighbor.

Old one(s) will be deleted and new one set.

Till now this method has the same functionality as set_ref_node(). Maybe later there will be a check, if the update results in a better sound-check following of this it is decided, whether the update happens or not.

Parameters:
Nodeneighbor to update
Nodereference node
See also:
set_ref_node(), update_ref_nodes()
template<typename OsModel_P, typename node_id_t_P, typename NeighborInfo_P, typename NeighborInfoMap_P, typename Arithmatic_P>
template<typename NodeList_P >
void wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::update_ref_nodes ( node_id_t  node,
const NodeList_P &  nl 
) [inline]

Set reference nodes of a neighbor.

Old one(s) will be deleted and new one(s) set.

Parameters:
Nodeneighbor to update
Nodereference nodes
See also:
set_ref_node(), update_ref_node()
template<typename OsModel_P , typename node_id_t_P , typename NeighborInfo_P , typename NeighborInfoMap_P , typename Arithmatic_P >
int wiselib::LocalizationNeighborhood< OsModel_P, node_id_t_P, NeighborInfo_P, NeighborInfoMap_P, Arithmatic_P >::valid_anchor_cnt ( void  )

This method count the number of valid anchors.

Valid means, that there is a distance to this anchor known and it has a position.

Returns:
Number of valid anchors
See also:
anchor_cnt(), LocalizationNeighborInfo::is_valid()

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines