public boolean removeNode(int node) {
		if(node > size) // if the node does not exist.Only relevant in in unit tests
			return false;

		// Remove the given node as adjacent from others
		for(int i = 1; i <= size; i++) {
			if(i != node) {
				GraphNode thisNode = getNode(i);
				LinkedList<GraphEdge> adjacents = (LinkedList<GraphEdge>) thisNode.getAdjacentNodes().clone();
				for(GraphEdge cursor : adjacents)
					if(cursor.getToNode().id() == node) {
						edges.remove(cursor);
						thisNode.getAdjacentNodes().remove(adjacents.indexOf(cursor));
					}
			}
		}

		for(int i = 1; i <= size; i++) { // remove edges coming and going to the given node
			if(!removeFromEdgesList(node, i))
				removeFromEdgesList(i, node);
		}

		// remove the node and correct the id of the nodes
		// from node to size.
		nodes.remove(node - 1);
		size--;
		for(int i = node; i <= size; i++)
			getNode(i).setId(i);
		return true;
	}