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
    • Method Summary

      Modifier and Type Method Description
      final static <T extends Any> Boolean )>circularDependency(T myId, <Error class: unknown class> inbound) Check if circular dependencies exist.
      final static <T extends Any> Boolean )>hasSelfDependency(T myId, <Error class: unknown class> inbound) Check if a device is self-referencing itself.
      final static <T extends Any> Boolean )>hasTransitiveDependency(T myId, <Error class: unknown class> inbound) Check if a device is part of a transitive circular dependency.
      final static <T extends Any> Boolean ,T)>greatestLowerBound(T myId, <Error class: unknown class> inbound, T nodes) Get the greatest lower bound for a set of devices.
      final static <T extends Any> Boolean )>isLeaf(T myId, <Error class: unknown class> inbound) Check if a device is a leaf of the graph.
      final static <T extends Any> Boolean )>isRoot(<Error class: unknown class> inbound) Check if a device is a root of the graph.
      final static <T extends Any> Boolean )>isParent(T myId, <Error class: unknown class> inbound)
      final static <T extends Any> Boolean ,T)>leastUpperBound(T myId, <Error class: unknown class> outbound, T nodes) Get the least upper bound for a set of devices.
      final static <T extends Any, U extends Any> U ,java.lang.Object,U)>nbrWrapper(T myId, <Error class: unknown class> connections, Object nbrMessage, U null) This nbrWrapper get the messages coming only from a subset of neighbors.
      final static Unit spreadBoundValue(Object myId, Object connections, Object nodes)
      final static Unit intersection(Object list1, Object list2)
      final static Unit isEmpty(Object list)
      final static Unit isNotEmpty(Object list)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • circularDependency

         final static <T extends Any> Boolean )>circularDependency(T myId, <Error class: unknown 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
        Returns:

        true if the device is part of a circular dependency, false otherwise

      • hasSelfDependency

         final static <T extends Any> Boolean )>hasSelfDependency(T myId, <Error class: unknown class> inbound)

        Check if a device is self-referencing itself.

        Parameters:
        myId - device id
        inbound - inbound connections
        Returns:

        true if the device is self-referencing itself

      • hasTransitiveDependency

         final static <T extends Any> Boolean )>hasTransitiveDependency(T myId, <Error class: unknown class> inbound)

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

        Parameters:
        myId - device id
        inbound - inbound connections
        Returns:

        true if the device is part of a transitive circular dependency

      • greatestLowerBound

         final static <T extends Any> Boolean ,T)>greatestLowerBound(T myId, <Error class: unknown 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
        Returns:

        true if the device is part of greatest lower bound set of devices, false otherwise

      • isLeaf

         final static <T extends Any> Boolean )>isLeaf(T myId, <Error class: unknown 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
        Returns:

        true if the device is a leaf, false otherwise

      • isRoot

         final static <T extends Any> Boolean )>isRoot(<Error class: unknown 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
        Returns:

        true if the device is a root, false otherwise

      • isParent

         final static <T extends Any> Boolean )>isParent(T myId, <Error class: unknown class> inbound)
        Parameters:
        myId - device id
        inbound - inbound connections
        Returns:

        true if the device is parrent of the current device

      • leastUpperBound

         final static <T extends Any> Boolean ,T)>leastUpperBound(T myId, <Error class: unknown 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
        Returns:

        true if the device is part of least upper bound set of devices, false otherwise

      • nbrWrapper

         final static <T extends Any, U extends Any> U ,java.lang.Object,U)>nbrWrapper(T myId, <Error class: unknown 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
        Returns:

        filtered set of messages