public void InsertChild(int index, CompositeWeight weightedchild) { if (weightedchild != null) { weightedchild.Composite.Parent = this; this.Children.Insert(index, weightedchild.Composite); this.Weights.Insert(index, weightedchild.Weight); } }
public void AddChild(CompositeWeight weightedchild) { if (weightedchild != null) { weightedchild.Composite.Parent = this; this.Children.Add(weightedchild.Composite); this.Weights.Add(weightedchild.Weight); } }