Пример #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);
 }