Пример #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);
 }