Package 

Class Graph

  • All Implemented Interfaces:

    
    public final class Graph
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • circularDependency

         final static <T extends Any> Boolean )>circularDependency(T myId, <ERROR CLASS> inbound)

        Check if circular dependencies exist.

        A circular dependency exists if a device is self-referencing itself or a transitive dependency exists.

        Parameters:
        myId - device id
        inbound - inbound connections
      • hasSelfDependency

         final static <T extends Any> Boolean )>hasSelfDependency(T myId, <ERROR CLASS> inbound)

        Check if a device is self-referencing itself.

        Parameters:
        myId - device id
        inbound - inbound connections
      • hasTransitiveDependency

         final static <T extends Any> Boolean )>hasTransitiveDependency(T myId, <ERROR CLASS> inbound)

        Check if a device is part of a transitive circular dependency.

        Parameters:
        myId - device id
        inbound - inbound connections
      • greatestLowerBound

         final static <T extends Any> Boolean ,T)>greatestLowerBound(T myId, <ERROR CLASS> inbound, T nodes)

        Get the greatest lower bound for a set of devices.

        Parameters:
        myId - device id
        inbound - inbound connections
        nodes - node on which estimate the greatest lower bound
      • isLeaf

         final static <T extends Any> Boolean )>isLeaf(T myId, <ERROR CLASS> inbound)

        Check if a device is a leaf of the graph.

        A device is a leaf when none of the other devices refers to it as an inbound connection, and the device has no outbound connections.

        Parameters:
        myId - device id
        inbound - inbound connections
      • isRoot

         final static <T extends Any> Boolean )>isRoot(<ERROR CLASS> inbound)

        Check if a device is a root of the graph.

        A device is a root when it has no inbound connections.

        Parameters:
        inbound - inbound connections
      • isParent

         final static <T extends Any> Boolean )>isParent(T myId, <ERROR CLASS> inbound)
        Parameters:
        myId - device id
        inbound - inbound connections
      • leastUpperBound

         final static <T extends Any> Boolean ,T)>leastUpperBound(T myId, <ERROR CLASS> outbound, T nodes)

        Get the least upper bound for a set of devices.

        Parameters:
        myId - device id
        outbound - outbound connections
        nodes - node on which estimate the least upper bound
      • nbrWrapper

         final static <T extends Any, U extends Any> U ,Object,U)>nbrWrapper(T myId, <ERROR CLASS> connections, Object nbrMessage, U null)

        This nbrWrapper get the messages coming only from a subset of neighbors. When working with graph, nbrWrabber must be used instead of nbr. Otherwise the graph logical structure is broken.

        If connections is the set of inbound connections, then nbrWrapper returns only the messages coming from the parents of the current device, replacing messages from the children with null. Using outbound connections does the opposite.

        Parameters:
        myId - device id
        connections - inbound connections
        null - placeholder for devices which not fulfill the filtering criteria