private RoomNode <TNode> CreateRoomNode(TNode node) { var roomNode = new RoomNode <TNode>(nodeToIntMapping.Count, node); nodeToIntMapping.Add(node, roomNode); return(roomNode); }
/// <inheritdoc /> public bool GetConfiguration(RoomNode <TRoom> node, out TConfiguration configuration) { if (hasValue[node.Id]) { configuration = vertices[node.Id]; return(true); } configuration = default(TConfiguration); return(false); }
public bool HasEdge(RoomNode <TRoom> from, RoomNode <TRoom> to) { throw new NotImplementedException(); }
public IEnumerable <RoomNode <TRoom> > GetNeighbours(RoomNode <TRoom> vertex) { throw new NotImplementedException(); }
public void AddEdge(RoomNode <TRoom> from, RoomNode <TRoom> to) { throw new NotSupportedException("The graph cannot be modified once constructed"); }
public void AddVertex(RoomNode <TRoom> vertex) { throw new NotSupportedException("The graph cannot be modified once constructed"); }
public IRoomDescription GetRoomDescription(RoomNode <TNode> node) { return(roomDescriptions[node.Id]); }
/// <inheritdoc /> public void RemoveConfiguration(RoomNode <TRoom> node) { vertices[node.Id] = default(TConfiguration); hasValue[node.Id] = false; }
/// <inheritdoc /> public void SetConfiguration(RoomNode <TRoom> node, TConfiguration configuration) { vertices[node.Id] = configuration; hasValue[node.Id] = true; }