private void setEdgeFaces() { for (Face face : getFaces()) { for (Edge edge : face.getEdges()) { edge.getFaces().add(face); } } }
private boolean isCellOpen(Cell cell) { Set<Face> cellFaces = cell.getFaces(); for (Face face : cellFaces) { for (Edge edge : face.getEdges()) { Set<Face> faceSiblingsByEdge = new HashSet<Face>(face.getSiblings(edge)); faceSiblingsByEdge.retainAll(cellFaces); if (faceSiblingsByEdge.size() == 0) { return true; } } } return false; }