Class LinkConstraint


  • public final class LinkConstraint
    extends Object
    Defines a constraint on a link between two nodes during structural learning.
    • Constructor Detail

      • LinkConstraint

        public LinkConstraint​(Node a,
                              Node b,
                              LinkConstraintMethod method,
                              LinkConstraintFailureMode failureMode)
        Initializes a new instance of the LinkConstraint class.
        Parameters:
        a - The first node in the link constraint.
        b - The second node in the link constraint.
        method - The constraint method.
        failureMode - The action taken if the link constraint is violated.
        Throws:
        NullPointerException - Raised if either [a] or [b] is null.
      • LinkConstraint

        public LinkConstraint​(Node a,
                              Node b,
                              Integer temporalOrder,
                              LinkConstraintMethod method,
                              LinkConstraintFailureMode failureMode)
        Initializes a new instance of the LinkConstraint class.
        Parameters:
        a - The first node in the link constraint.
        b - The second node in the link constraint.
        temporalOrder - The order of the temporal link constraint (temporal nodes only).
        method - The constraint method.
        failureMode - The action taken if the link constraint is violated.
        Throws:
        NullPointerException - Raised if either [a] or [b] is null.
    • Method Detail

      • getA

        public Node getA()
        Gets the first node involved in the constraint. The type of constraint is defined using the getMethod().
        See Also:
        getMethod()
      • getB

        public Node getB()
        Gets the second node involved in the constraint. The type of constraint is defined using the getMethod().
        See Also:
        getMethod()
      • getTemporalOrder

        public Integer getTemporalOrder()
        Gets the temporal order of the constraint. Used for temporal links such as those found in time series and sequence networks (Dynamic Bayesian networks).
      • getFailureMode

        public LinkConstraintFailureMode getFailureMode()
        Gets the action to take when this link constraint is violated.