Changeset 4068 for trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/ITree.cs
- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/ITree.cs
r3038 r4068 1 1 using System; 2 using System.Collections.Generic;3 using System.Text;4 2 5 namespace Netron.Diagramming.Core.Analysis 6 { 3 namespace Netron.Diagramming.Core.Analysis { 4 /// <summary> 5 /// This interface describes the additional members useful if the underlying graph is a tree. 6 /// </summary> 7 public interface ITree : IGraph { 8 7 9 /// <summary> 8 /// This interface describes the additional members useful if the underlying graph is a tree.10 /// Gets or sets a value indicating whether this tree is directed. 9 11 /// </summary> 10 public interface ITree : IGraph 11 { 12 /// <value> 13 /// <c>true</c> if this instance is directed; otherwise, <c>false</c>. 14 /// </value> 15 new bool IsDirected { get; set; } 16 /// <summary> 17 /// Gets or sets the root of the tree 18 /// </summary> 19 INode Root { get; set; } 20 /// <summary> 21 /// Gets the children of the given node in the tree hierarchy. 22 /// </summary> 23 /// <param name="node"></param> 24 /// <returns></returns> 25 CollectionBase<INode> Children(INode node); 26 /// <summary> 27 /// Gets the edges connecting the children of the given node. 28 /// </summary> 29 /// <param name="node"></param> 30 /// <returns></returns> 31 CollectionBase<IEdge> ChildEdges(INode node); 12 32 13 /// <summary> 14 /// Gets or sets a value indicating whether this tree is directed. 15 /// </summary> 16 /// <value> 17 /// <c>true</c> if this instance is directed; otherwise, <c>false</c>. 18 /// </value> 19 new bool IsDirected { get; set;} 20 /// <summary> 21 /// Gets or sets the root of the tree 22 /// </summary> 23 INode Root { get;set;} 24 /// <summary> 25 /// Gets the children of the given node in the tree hierarchy. 26 /// </summary> 27 /// <param name="node"></param> 28 /// <returns></returns> 29 CollectionBase<INode> Children(INode node); 30 /// <summary> 31 /// Gets the edges connecting the children of the given node. 32 /// </summary> 33 /// <param name="node"></param> 34 /// <returns></returns> 35 CollectionBase<IEdge> ChildEdges(INode node); 33 /// <summary> 34 /// Returns the next sibling node of the given node. 35 /// </summary> 36 /// <param name="node">The node.</param> 37 /// <returns></returns> 38 INode NextSibling(INode node); 36 39 37 38 /// Returns the nextsibling node of the given node.39 40 41 42 INode NextSibling(INode node);40 /// <summary> 41 /// Returns the previous sibling node of the given node. 42 /// </summary> 43 /// <param name="node">The node.</param> 44 /// <returns></returns> 45 INode PreviousSibling(INode node); 43 46 44 45 /// Returns the previous sibling nodeof the given node.46 47 48 49 INode PreviousSibling(INode node);47 /// <summary> 48 /// Returns the last child of the given node. 49 /// </summary> 50 /// <param name="node">The node.</param> 51 /// <returns></returns> 52 INode LastChild(INode node); 50 53 51 /// <summary> 52 /// Returns the last child of the given node. 53 /// </summary> 54 /// <param name="node">The node.</param> 55 /// <returns></returns> 56 INode LastChild(INode node); 57 58 /// <summary> 59 /// Returns the first child of the given node. 60 /// </summary> 61 /// <param name="node">The node.</param> 62 /// <returns></returns> 63 INode FirstChild(INode node); 64 /// <summary> 65 /// Returns how many children the given node has. 66 /// </summary> 67 /// <param name="node">The node.</param> 68 /// <returns></returns> 69 int ChildCount(INode node); 70 /// <summary> 71 /// Returns the depth the specified node. 72 /// </summary> 73 /// <param name="node">The node.</param> 74 /// <returns></returns> 75 int Depth(INode node); 76 /// <summary> 77 /// Returns the parent edge of the given node. 78 /// </summary> 79 /// <param name="node">The node.</param> 80 /// <returns></returns> 81 IEdge ParentEdge(INode node); 82 /// <summary> 83 /// Executes a the given <see cref="System.Action"/> on each node, starting from the given node, by means of a traversal 84 /// </summary> 85 /// <param name="action">The action.</param> 86 /// <param name="startNode">The start node.</param> 87 void ForEach<T>(Action<T> action, INode startNode) where T : INode; 88 } 54 /// <summary> 55 /// Returns the first child of the given node. 56 /// </summary> 57 /// <param name="node">The node.</param> 58 /// <returns></returns> 59 INode FirstChild(INode node); 60 /// <summary> 61 /// Returns how many children the given node has. 62 /// </summary> 63 /// <param name="node">The node.</param> 64 /// <returns></returns> 65 int ChildCount(INode node); 66 /// <summary> 67 /// Returns the depth the specified node. 68 /// </summary> 69 /// <param name="node">The node.</param> 70 /// <returns></returns> 71 int Depth(INode node); 72 /// <summary> 73 /// Returns the parent edge of the given node. 74 /// </summary> 75 /// <param name="node">The node.</param> 76 /// <returns></returns> 77 IEdge ParentEdge(INode node); 78 /// <summary> 79 /// Executes a the given <see cref="System.Action"/> on each node, starting from the given node, by means of a traversal 80 /// </summary> 81 /// <param name="action">The action.</param> 82 /// <param name="startNode">The start node.</param> 83 void ForEach<T>(Action<T> action, INode startNode) where T : INode; 84 } 89 85 }
Note: See TracChangeset
for help on using the changeset viewer.