Class NodeDistributionKey

  • All Implemented Interfaces:
    Comparable<NodeDistributionKey>

    public final class NodeDistributionKey
    extends Object
    implements Comparable<NodeDistributionKey>
    Identifies a distribution assigned or to be assigned to a node. Some nodes may have more than one distribution assigned to them (e.g. temporal nodes or noisy nodes), and this is used to differentiate between them.
    • Constructor Detail

      • NodeDistributionKey

        public NodeDistributionKey()
        Initializes a new instance of the NodeDistributionKey class with defaults.
      • NodeDistributionKey

        public NodeDistributionKey​(int order)
        Initializes a new instance of a NodeDistributionKey.
        Parameters:
        order - The temporal order of the node distribution.
      • NodeDistributionKey

        public NodeDistributionKey​(Node relatedNode)
        Initializes a new instance of a NodeDistributionKey.
        Parameters:
        relatedNode - The parent of the noisy node this distribution refers to, or the noisy node itself to identify the leak distribution. This will be null, unless the node is a noisy node.
      • NodeDistributionKey

        public NodeDistributionKey​(int order,
                                   Node relatedNode)
        Initializes a new instance of a NodeDistributionKey.
        Parameters:
        order - The temporal order of the related node distribution.
        relatedNode - The parent of the noisy node this distribution refers to, or the noisy node itself to identify the leak distribution. This will be null, unless the node is a noisy node.
    • Method Detail

      • getDefault

        public static NodeDistributionKey getDefault()
        Gets a default instance, which is equivalent to constructing a new instance with the default constructor.
      • getOrder

        public int getOrder()
        Gets the temporal order of the related node distribution.
      • getRelatedNode

        public Node getRelatedNode()
        Gets the parent of the noisy node this distribution refers to, or the noisy node itself to identify the leak distribution. This will be null, unless the node is a noisy node. A noisy node is specified using multiple distributions, one for each parent and a leak distribution. Set the related node property to a parent, or set it to the current node to set the leak distribution.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(NodeDistributionKey other)
        Indicates whether the current object is equal to another object of the same type.
        Parameters:
        other - An object to compare with this object.
        Returns:
        true if the current object is equal to the [other] parameter; otherwise, false.