/// <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); }
public BaseNode(MPQTree tree) { ContainedPersons = new LinkedList <Person>(); this.tree = tree; }
public Leaf(MPQTree tree) : base(tree) { }
public Section(MPQTree tree) : base(tree) { }
public QNode(MPQTree tree) : base(tree) { Sections = new List <Section>(); }
public PNode(MPQTree tree) : base(tree) { Children = new LinkedList <BaseNode>(); tree.manipulatedPNodes.Add(this); }