public int toDegree(Object to, boolean excludeSameVertexEdges) {				
		int count = 0;
		Object[] vertices = verticesToNeighbors.keySet().toArray();
		for (int i=0; i<vertices.length; i++)			
			if (hasEdge(vertices[i], to) && (!vertices[i].equals(to) || !excludeSameVertexEdges))
				count++;
		return count;
	}