Package ptolemy.graph

Class NonLatticeCounterExample

  • Direct Known Subclasses:
    NonProductLatticeCounterExample

    public class NonLatticeCounterExample
    extends java.lang.Object
    A data structure that provides counterexample information when a graph is tested to see if it is a lattice. If a graph is not a lattice, it could be because a set of nodes have no least upper or greatest lower bound, or because the graph has a cycle.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Charles Shelton
    Pt.AcceptedRating:
    Red (cshelton)
    Pt.ProposedRating:
    Red (cshelton)
    • Constructor Detail

      • NonLatticeCounterExample

        public NonLatticeCounterExample​(NonLatticeCounterExample.ExampleType exampleType)
        Construct a NonLatticeCounterExample object with the given example type.
        Parameters:
        exampleType - The given example type for this counterexample.
      • NonLatticeCounterExample

        public NonLatticeCounterExample​(NonLatticeCounterExample.ExampleType exampleType,
                                        java.util.List nodeList)
        Construct a NonLatticeCounterExample object with the given example type and list of nodes in the graph.
        Parameters:
        exampleType - The given example type for this counterexample.
        nodeList - The list of node weights for this counterexample.
      • NonLatticeCounterExample

        public NonLatticeCounterExample​(java.lang.Object node)
        Construct a NonLatticeCounterExample object for a graph with a cycle.
        Parameters:
        node - The weight of one of the nodes in the graph that is on the cycle path.
      • NonLatticeCounterExample

        public NonLatticeCounterExample​(CPO.BoundType bound,
                                        java.lang.Object node1,
                                        java.lang.Object node2)
        Construct a NonLatticeCounterExample object for a pair of nodes that have either no least upper or greatest lower bound.
        Parameters:
        bound - The bound type for this counter example.
        node1 - The first node weight.
        node2 - The second node weight.
    • Method Detail

      • getExampleType

        public NonLatticeCounterExample.ExampleType getExampleType()
        Return the example type for this NonLatticeCounterExample.
        Returns:
        Either LEASTUPPER, GREATESTLOWER, or GRAPHCYCLE.
      • getNodeList

        public java.util.List getNodeList()
        Return the list of node weights in the graph associated with this counter example.
        Returns:
        The list of node weights.