Beispiel #1
0
        /// <summary>
        /// removes the given link from the graph
        /// </summary>
        /// <param name="victim">
        /// link object to be removed <see cref="hypergraph_link"/>
        /// </param>
        public void RemoveLink(hypergraph_link victim)
        {
            hypergraph_node node = victim.To;

            node.Links.Remove(victim);
            Links.Remove(victim);
        }
Beispiel #2
0
 public void LinkByReference(hypergraph_node from_node, hypergraph_node to_node,
                             hypergraph_link link)
 {
     link.From = from_node;
     link.To   = to_node;
     link.To.Add(link);
     Links.Add(link);
 }
Beispiel #3
0
        public void LinkByID(int from_node_ID, int to_node_ID)
        {
            hypergraph_link link = new hypergraph_link();

            link.From = GetNode(from_node_ID);
            link.To   = GetNode(to_node_ID);
            link.To.Add(link);
            Links.Add(link);
        }
Beispiel #4
0
        public void LinkByName(string from_node_name, string to_node_name)
        {
            hypergraph_link link = new hypergraph_link();

            link.From = GetNode(from_node_name);
            link.To   = GetNode(to_node_name);
            link.To.Add(link);
            Links.Add(link);
        }
Beispiel #5
0
        public void LinkByIndex(int from_node_index, int to_node_index)
        {
            hypergraph_link link = new hypergraph_link();

            link.From = Nodes[from_node_index];
            link.To   = Nodes[to_node_index];
            link.To.Add(link);
            Links.Add(link);
        }
Beispiel #6
0
 /// <summary>
 /// propogates the given flag index from the given node
 /// </summary>
 /// <param name="node">
 /// A <see cref="hypergraph_node"/>
 /// </param>
 /// <param name="flag_index">
 /// A <see cref="System.Int32"/>
 /// </param>
 /// <param name="members">
 /// A <see cref="List`1"/>
 /// </param>
 public void PropogateFlag(hypergraph_node node, int flag_index, List <hypergraph_node> members)
 {
     if (node.Flags[flag_index] == false)
     {
         node.Flags[flag_index] = true;
         members.Add(node);
         for (int i = 0; i < node.Links.Count; i++)
         {
             hypergraph_link link = node.Links[i];
             PropogateFlag(link.From, flag_index, members);
         }
     }
 }
Beispiel #7
0
 public void Add(hypergraph_link link)
 {
     Links.Add(link);
 }
Beispiel #8
0
 public void Add(hypergraph_link link)
 {
     Links.Add(link);
 }
Beispiel #9
0
 /// <summary>
 /// removes the given link from the graph
 /// </summary>
 /// <param name="victim">
 /// link object to be removed <see cref="hypergraph_link"/>
 /// </param>
 public void RemoveLink(hypergraph_link victim)
 {
     hypergraph_node node = victim.To;
     node.Links.Remove(victim);
     Links.Remove(victim);
 }
Beispiel #10
0
 public void LinkByReference(hypergraph_node from_node, hypergraph_node to_node,
                             hypergraph_link link)
 {
     link.From = from_node;
     link.To = to_node;
     link.To.Add(link);
     Links.Add(link);
 }
Beispiel #11
0
 public void LinkByName(string from_node_name, string to_node_name)
 {
     hypergraph_link link = new hypergraph_link();
     link.From = GetNode(from_node_name);
     link.To = GetNode(to_node_name);
     link.To.Add(link);
     Links.Add(link);
 }
Beispiel #12
0
 public void LinkByID(int from_node_ID, int to_node_ID)
 {
     hypergraph_link link = new hypergraph_link();
     link.From = GetNode(from_node_ID);
     link.To = GetNode(to_node_ID);
     link.To.Add(link);
     Links.Add(link);
 }
Beispiel #13
0
 public void LinkByIndex(int from_node_index, int to_node_index)
 {
     hypergraph_link link = new hypergraph_link();
     link.From = Nodes[from_node_index];
     link.To = Nodes[to_node_index];
     link.To.Add(link);
     Links.Add(link);
 }