Changeset 10471 for branches/HeuristicLab.ReingoldTilfordTreeLayout/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/LayoutEngines/LayoutNode.cs
- Timestamp:
- 02/19/14 22:18:49 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.ReingoldTilfordTreeLayout/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/LayoutEngines/LayoutNode.cs
r9970 r10471 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Linq; 24 25 25 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding .LayoutEngines{26 public class LayoutNode<T> : ILayoutNode<T>where T : class {27 public ILayoutNode<T> NextLeft {26 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { 27 public class LayoutNode<T> where T : class { 28 public LayoutNode<T> NextLeft { 28 29 get { 29 30 return Children == null ? Thread : Children.First(); 30 31 } 31 32 } 32 public ILayoutNode<T> NextRight {33 public LayoutNode<T> NextRight { 33 34 get { 34 35 return Children == null ? Thread : Children.Last(); 35 36 } 36 37 } 37 public ILayoutNode<T> LeftSibling {38 public LayoutNode<T> LeftSibling { 38 39 get { 39 40 if (Parent == null) return null; … … 41 42 } 42 43 } 43 public ILayoutNode<T> LeftmostSibling {44 public LayoutNode<T> LeftmostSibling { 44 45 get { 45 46 if (Parent == null) return null; … … 48 49 } 49 50 50 public ILayoutNode<T> Thread { get; set; }51 public ILayoutNode<T> Ancestor { get; set; }52 public ILayoutNode<T> Parent { get; set; }53 public List< ILayoutNode<T>> Children { get; set; }51 public LayoutNode<T> Thread { get; set; } 52 public LayoutNode<T> Ancestor { get; set; } 53 public LayoutNode<T> Parent { get; set; } 54 public List<LayoutNode<T>> Children { get; set; } 54 55 public float Mod { get; set; } 55 56 public float Prelim { get; set; } … … 65 66 } 66 67 67 public T Content { get; set; } 68 private T content; 69 public T Content { 70 get { return content; } 71 set { 72 if (value == null) 73 throw new ArgumentNullException("LayoutNode: Content cannot be null."); 74 content = value; 75 } 76 } 68 77 } 69 78 }
Note: See TracChangeset
for help on using the changeset viewer.