GHS
Leader Election Based on GHS Minimum Spanning Tree
|
Go to the documentation of this file.
52 template <std::
size_t A, std::
size_t B>
59 for (std::size_t i=0;i<A;i++){
69 case UNKNOWN: {ss<<
"UNK";
break;}
70 case MST: {ss<<
"MST+C ";
break;}
72 case DELETED: {ss<<
"DEL";
break;}
90 template <std::
size_t A, std::
size_t B>
92 outs<<
"{id:"<<s.get_id()<<
" ";
93 outs<<
"leader:"<<s.get_leader_id()<<
" ";
94 outs<<
"level:"<<s.get_level()<<
" ";
95 outs<<
"waiting:"<<s.waiting_count()<<
" ";
96 outs<<
"delayed:"<<s.delayed_count()<<
" ";
97 outs<<
"converged:"<<s.is_converged()<<
" ";
int agent_t
problems for GhsState
Definition: agent.h:51
@ MST
We have added this edge as an MST link.
Definition: edge.h:86
@ MST_PARENT
We have added this edge as parent MST link.
Definition: edge.h:88
@ DELETED
We have decided not to further consider this edge, either it was "bad", or it is already part of our ...
Definition: edge.h:90
agent_t root
The root is the "from" side of the edge.
Definition: edge.h:106
agent_t peer
The peer is the "to" side of the edge.
Definition: edge.h:104
@ UNKNOWN
We have not probed this edge for information yet, or have not recieved a reponse.
Definition: edge.h:84
status_t status
The status of this edge, starting with UNKNOWN.
Definition: edge.h:108
some conveneience implementations to print le::ghs::GhsState objects with std::ostream
std::string dump_edges(const le::ghs::GhsState< A, B > &s)
Definition: ghs_printer_impl.hpp:53
metric_t metric_val
By default, this edge has metric_val = WORST_METRIC.
Definition: edge.h:110
A struct to hold all the communication edge information.
Definition: edge.h:98
std::ostream & operator<<(std::ostream &outs, const le::ghs::GhsState< A, B > &s)
Definition: ghs_printer_impl.hpp:91
@ OK
The operation was successful.
Definition: errno.h:50
The main state machine for the GHS algorithm
Definition: ghs.h:82