예제 #1
0
        /// <summary>
        /// adds a link to this node
        /// </summary>
        public bool AddIncomingLink(String link_type,
		                            node source,
		                            truthvalue weight)
        {
            bool success = false;
            link lnk = null;

            if (!linkTemporal.IsTemporalLinkType(link_type))
                lnk = new link(source, this, weight);
            else
                lnk = new linkTemporal(source, this, weight);

            success = lnk.SetLinkType(link_type);
            if (success)
                AddIncomingLink(lnk);
            return(success);
        }
예제 #2
0
        /// <summary>
        /// adds a link to this node
        /// </summary>
        public bool AddOutgoingLink(String link_type,
		                            node destination,
		                            truthvalue weight)
        {
            bool success = false;
            link lnk = null;

            if (!linkTemporal.IsTemporalLinkType(link_type))
                lnk = new link(this, destination, weight);
            else
                lnk = new linkTemporal(this, destination, weight);

            success = lnk.SetLinkType(link_type);
            if (success)
                AddOutgoingLink(lnk);
            return(success);
        }
예제 #3
0
 /// <summary>
 /// remove a link from the outgoing connections
 /// </summary>
 public void RemoveFromOutgoing(link lnk)
 {
     RemoveFromOutgoingSet(lnk);
 }
예제 #4
0
 /// <summary>
 /// adds a link to this node
 /// </summary>
 public void AddIncomingLink(link lnk)
 {
     AddToIncomingSet(lnk);
 }
예제 #5
0
 /// <summary>
 /// remove a link from the incoming connections
 /// </summary>
 public void RemoveFromIncoming(link lnk)
 {
     RemoveFromIncomingSet(lnk);
 }