Example #1
0
 /// <summary>
 /// Sets edge weight
 /// </summary>
 /// <param name="childID">Outgoing node id</param>
 /// <param name="weight">Edge weight</param>
 public void SetEdgeWeight(string childID, double weight)
 {
     if (Children.ContainsKey(childID))
     {
         Children[childID].Weight = weight;
     }
     else
     {
         PDGEdge edge = new PDGEdge(childID);
         edge.Weight = weight;
         Children.Add(childID, edge);
     }
 }
Example #2
0
 /// <summary>
 /// Adds an outgoing node
 /// </summary>
 /// <param name="childID">Outgoing node id</param>
 public void AddChild(string childID)
 {
     if (Children.ContainsKey(childID))
     {
         Children[childID].Weight += 1;
     }
     else
     {
         PDGEdge edge = new PDGEdge(childID);
         edge.Weight = 1;
         Children.Add(childID, edge);
     }
 }
Example #3
0
 /// <summary>
 /// Adds an outgoing node
 /// </summary>
 /// <param name="childID">Outgoing node id</param>
 public void AddChild(string childID)
 {
     if (Children.ContainsKey(childID))
     {
         Children[childID].Weight += 1;
     }
     else
     {
         PDGEdge edge = new PDGEdge(childID);
         edge.Weight = 1;
         Children.Add(childID, edge);
     }
 }
Example #4
0
 /// <summary>
 /// Sets edge weight
 /// </summary>
 /// <param name="childID">Outgoing node id</param>
 /// <param name="weight">Edge weight</param>
 public void SetEdgeWeight(string childID, double weight)
 {
     if (Children.ContainsKey(childID))
     {
         Children[childID].Weight = weight;
     }
     else
     {
         PDGEdge edge = new PDGEdge(childID);
         edge.Weight = weight;
         Children.Add(childID, edge);
     }
 }