Public Member Functions | Public Attributes

jmitie::CjNodeSelector_select_va_t Struct Reference

A struct encapsulating the required arguments to the selectNode(...) method of a sub-class of CjNodeSelector. More...

#include <CjNodeSelector.hh>

Collaboration diagram for jmitie::CjNodeSelector_select_va_t:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CjNodeSelector_select_va_t (int epoch, boost::mt19937 *rng, int start_node=-1, bool skip_start=true, bool skip_fullconn=true, bool selfloop_ok=false)
 CjNodeSelector_select_va_t (const CjNetworkProcess_act_va_t &temp, int start_node=-1, bool skip_start=true, bool skip_fullconn=true, bool selfloop_ok=false)
 CjNodeSelector_select_va_t (int epoch, std::vector< int > *invalid_choice, boost::mt19937 *rng, int start_node=-1, bool skip_start=true, bool skip_fullconn=true, bool selfloop_ok=false)
 CjNodeSelector_select_va_t (std::vector< int > *invalid_choice, const CjNetworkProcess_act_va_t &temp, int start_node=-1, bool skip_start=true, bool skip_fullconn=true, bool selfloop_ok=false)

Public Attributes

int m_epoch
 The current epoch (if < 0 then this is the end epoch).
boost::mt19937 * m_rng
 A source of entropy. This shouldn't be stored in the selector - for use only in selectNode(...).
std::vector< int > * m_invalid_choice
 a vector of ints which are either 0 or 1 - if 1 then the node of that index is an invalid choice
int m_start_node
 if set to -1 then this node selector will be searching for the start node of a link, otherwise the destination, and this is set to the start node
bool m_skip_start
 If true and m_skip_start is not -1 then the start node will not be considered for selection, but if false then may be considered.
bool m_skip_fullconn
 If true then a fully connected node will not be selected.
bool m_selfloop_ok
 if set to false then the a self-loop isn't counted in the fullconn testing (see m_skip_fullconn)

Detailed Description

A struct encapsulating the required arguments to the selectNode(...) method of a sub-class of CjNodeSelector.

When creating new sub-classes of CjNodeSelector and it is necessary to add an argument to the selectNode(...), they can be added here rather than updating the declaration of the CjNodeSelector::selectNode(...) and all sub-classes


Member Data Documentation

a vector of ints which are either 0 or 1 - if 1 then the node of that index is an invalid choice

This could be 0, in which case there is nothing to check against. m_skip_start, m_skip_fullconn and m_selfloop_ok should still be checked, though. This is implemented as a pointer so the actual vector can belong to the calling process so it does not have to be re-created every time a CjNodeSelector_select_va_t object is created.

If true then a fully connected node will not be selected.

Fully connected means connected to all other nodes, but not necessarily to itself, unless m_selfloop_ok is set


The documentation for this struct was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator