private RoomNode <TNode> CreateRoomNode(TNode node)
        {
            var roomNode = new RoomNode <TNode>(nodeToIntMapping.Count, node);

            nodeToIntMapping.Add(node, roomNode);

            return(roomNode);
        }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
 public bool HasEdge(RoomNode <TRoom> from, RoomNode <TRoom> to)
 {
     throw new NotImplementedException();
 }
Esempio n. 4
0
 public IEnumerable <RoomNode <TRoom> > GetNeighbours(RoomNode <TRoom> vertex)
 {
     throw new NotImplementedException();
 }
Esempio n. 5
0
 public void AddEdge(RoomNode <TRoom> from, RoomNode <TRoom> to)
 {
     throw new NotSupportedException("The graph cannot be modified once constructed");
 }
Esempio n. 6
0
 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]);
 }
Esempio n. 8
0
 /// <inheritdoc />
 public void RemoveConfiguration(RoomNode <TRoom> node)
 {
     vertices[node.Id] = default(TConfiguration);
     hasValue[node.Id] = false;
 }
Esempio n. 9
0
 /// <inheritdoc />
 public void SetConfiguration(RoomNode <TRoom> node, TConfiguration configuration)
 {
     vertices[node.Id] = configuration;
     hasValue[node.Id] = true;
 }