예제 #1
0
 private void setEdgeFaces() {
   for (Face face : getFaces()) {
     for (Edge edge : face.getEdges()) {
       edge.getFaces().add(face);
     }
   }
 }
예제 #2
0
  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;
  }