예제 #1
0
        /// <summary>
        /// Test if the given Graph is an interval graph
        /// </summary>
        /// <param name="output">Returns a invalid structure</param>
        /// <returns>true if the graph is a interval graph otherwise false</returns>
        public bool TestIntervalGraph(out Person[] output)
        {
            if (!TestChordal(out output))
            {
                return(false);
            }

            output = LexBFS(Direction.Forwards);

            MPQTree tree = new MPQTree();

            for (int i = 0; i < output.Length; i++)
            {
                if (!tree.AddVertice(output[i]))
                {
                    return(FindAT(out output, output[i]));
                }
            }

            tree.GenerateIntervalRepresentation();
            return(true);
        }
예제 #2
0
 public BaseNode(MPQTree tree)
 {
     ContainedPersons = new LinkedList <Person>();
     this.tree        = tree;
 }
예제 #3
0
 public Leaf(MPQTree tree)
     : base(tree)
 {
 }
예제 #4
0
 public Section(MPQTree tree)
     : base(tree)
 {
 }
예제 #5
0
 public QNode(MPQTree tree)
     : base(tree)
 {
     Sections = new List <Section>();
 }
예제 #6
0
 public PNode(MPQTree tree)
     : base(tree)
 {
     Children = new LinkedList <BaseNode>();
     tree.manipulatedPNodes.Add(this);
 }