/// <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> /// 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); }