public void RemoveNode(_Node node) { lock (AllNodesLock) { AllNodes.Remove(node); } }
public AbstractEdge(_Node node1, _Node node2) { Node1 = node1; Node2 = node2; HandleNeighbourhood(); }
public List <IEdge> GetRelatedEdges(_Node node, out List <_Node> relatedNodes) { var edgesToBeRemoved = new List <IEdge>(); relatedNodes = new List <_Node>(); lock (AllEdgesLock) { // go through all edges, find the nodes and edges adjacent foreach (var edge in AllEdges) { if (edge.GetNode1() == node) { edgesToBeRemoved.Add(edge); relatedNodes.Add(edge.GetNode2()); } else if (edge.GetNode2() == node) { edgesToBeRemoved.Add(edge); relatedNodes.Add(edge.GetNode1()); } } } return(edgesToBeRemoved); }
public void UpdateNeighbour(_Node neighbour) { lock (NeighbourhoodLock) { Neighbours[neighbour.Id] = neighbour; } }
public void AddNeighbour(_Node node) { lock (NeighbourhoodLock) { Neighbours.Add(node.Id, node); } }
public void AddNode(_Node node) { lock (AllNodesLock) { NodeCount++; AllNodes.Add(node); } }
protected abstract void UpdateNeighbourInformation(_Node neighbour);
/// <summary> /// This method will be implemented for single initiation strategies. /// </summary> /// <param name="root"></param> public abstract void UserDefined_SingleInitiatorProcedure(_Node root);