/// <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); }
/// <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); }
/// <summary> /// remove a link from the outgoing connections /// </summary> public void RemoveFromOutgoing(link lnk) { RemoveFromOutgoingSet(lnk); }
/// <summary> /// adds a link to this node /// </summary> public void AddIncomingLink(link lnk) { AddToIncomingSet(lnk); }
/// <summary> /// remove a link from the incoming connections /// </summary> public void RemoveFromIncoming(link lnk) { RemoveFromIncomingSet(lnk); }