Click or drag to resize
UniqueKUtility 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
SystemObject
  WrapperClassesUtility
    DistributedAlgorithmsUniqueKUtility

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

The UniqueKUtility type exposes the following members.

Constructors
  NameDescription
Public methodUniqueKUtility
Initializes a new instance of the UniqueKUtility class
Top
Methods
  NameDescription
Public methodErrorChecks
Checks for errors.
(Overrides UtilityErrorChecks(Int32, ListInt32, String).)
Public methodStatic memberFindK(ListInt32)
Finds the maximum number of repeating IDs in a list of integers
Public methodStatic memberFindK(ListNode)
Finds the maximum number of repeating IDs in a list of nodes
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