Click or drag to resize
LCRUtility Class
Distributed Algorithm Simulator
A utility class that performs actions such as initializations and error checks. It acts as an interface to the main application which obtains the status of the algorithm at each step.
Inheritance Hierarchy

Namespace: DistributedAlgorithms
Assembly: DistributedAlgorithmSimulator (in DistributedAlgorithmSimulator.exe) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class LCRUtility : Utility

The LCRUtility type exposes the following members.

Constructors
  NameDescription
Public methodLCRUtility
Initializes a new instance of the LCRUtility class
Top
Methods
  NameDescription
Public methodErrorChecks
Checks for errors.
(Overrides UtilityErrorChecks(Int32, ListInt32, String).)
Public methodStatic memberFindK
Finds the maximum number of repeating IDs in a list of integers
Public methodGetStatus
Returns (as a reference) the state of all the nodes as a NodeState list.
(Overrides UtilityGetStatus(Int32, ListNode, ListNodeState).)
Public methodGetVariables
Returns a list of variables used in the algorithm.
(Overrides UtilityGetVariables.)
Public methodInitialize
Performs required initializations
(Overrides UtilityInitialize(Int32, ListNode, ListMessage, String).)
Public methodIsFinished
Checks whether the algorithm execution is finished.
(Overrides UtilityIsFinished(Int32, ListNode).)
Public methodPrintList
Prints the ring orientation in clockwise order.
(Overrides UtilityPrintList(Int32, ListNode, String, String).)
Public methodPrintStep
Returns (as a reference) the state of all the nodes as a single string.
(Overrides UtilityPrintStep(Int32, Int32, ListNode, String, String).)
Top
See Also