@@ -156,6 +156,8 @@ void MisAlgorithm::Round3(int id, vector<int>* vecNeiId, double& randNum, double
156
156
Log (id, " ...Round 3 Finish..." );
157
157
}
158
158
159
+ // In this method, each node receives the sent messages that containes the status of its neighbors.
160
+ // If there is at least one neighbor with status Mis, then the status of the node will be ComMis.
159
161
void MisAlgorithm::Round4 (int id, vector<int >* vecNeiId)
160
162
{
161
163
Log (id, " ...Round 4 Start..." );
@@ -181,6 +183,8 @@ void MisAlgorithm::Round4(int id, vector<int>* vecNeiId)
181
183
Log (id, " ...Round 4 Finish..." );
182
184
}
183
185
186
+ /* In this method, if the status of a node is ComMis, then it sends its Id to its neighbors. The resean of this task is explained
187
+ in the explanation of the next method.*/
184
188
void MisAlgorithm::Round5 (int id, vector<int >* vecNeiId)
185
189
{
186
190
Log (id, " ...Round 5 Start..." );
@@ -198,6 +202,10 @@ void MisAlgorithm::Round5(int id, vector<int>* vecNeiId)
198
202
Log (id, " ...Round 5 Finish..." );
199
203
}
200
204
205
+ /* In this method, if the status of the node is Unknown, it updates the list (vecNeiId) that contains the neighbors Ids.
206
+ In the update task, the node deletes the Ids of all ComMis neighbors from vecNeiId.
207
+ It should be noted that the nodes with status Mis or ComMis are deactive at the end of each iteration.
208
+ The update task is necessary because if it is not done, in the next iteration, the node waits for reveiveing messages from the deactive neighbors.*/
201
209
void MisAlgorithm::Round6 (int id, vector<int >* vecNeiId)
202
210
{
203
211
Log (id, " ...Round 6 Start..." );
0 commit comments