示例#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);
 }