code: public RelationGraph filterByEdge(@NonNull Predicate<RelationEdge> edgePredicate) {
        RelationGraph gPrime = new RelationGraph();
        edges().stream().filter(edgePredicate)
               .forEach(e -> {
                  if (!gPrime.containsVertex(e.getFirstVertex())) {
                     gPrime.addVertex(e.getFirstVertex());
                  }
                  if (!gPrime.containsVertex(e.getSecondVertex())) {
                     gPrime.addVertex(e.getSecondVertex());
                  }
                  gPrime.addEdge(e);
               });
        return gPrime;
     }
docs: Filters the graph by evaluating the edges using the given predicate. The edges passing the predicate and
  their incident vertices are used to construct a new filtered RelationGraph.
  
  @param edgePredicate the edge predicate
  @return the relation graph