@Test public void execute() throws Exception { GraphCollection collection = getTestCollection(); collection = collection.distinctById(); assertEquals(5, collection.getGraphHeads().count()); collection = collection.distinctByIsomorphism(); assertEquals(3, collection.getGraphHeads().count()); }
@Override public GC execute(GC collection) { DataSet<GradoopId> graphIds = getCanonicalLabels(collection) .distinct(1) .map(new IdFromGraphHeadString()); DataSet<G> graphHeads = collection.getGraphHeads() .filter(new IdInBroadcast<>()) .withBroadcastSet(graphIds, IdInBroadcast.IDS); return selectVerticesAndEdges(collection, graphHeads); }
DistinctByIsomorphism extends GroupByIsomorphism<G, V, E, LG, GC> { @Override public GC execute(GC collection) { DataSet<GradoopId> graphIds = getCanonicalLabels(collection) .distinct(1) .map(new IdFromGraphHeadString()); DataSet<G> graphHeads = collection.getGraphHeads() .filter(new IdInBroadcast<>()) .withBroadcastSet(graphIds, IdInBroadcast.IDS); return selectVerticesAndEdges(collection, graphHeads); } }
DistinctByIsomorphism extends GroupByIsomorphism<G, V, E, LG, GC> { @Override public GC execute(GC collection) { DataSet<GradoopId> graphIds = getCanonicalLabels(collection) .distinct(1) .map(new IdFromGraphHeadString()); DataSet<G> graphHeads = collection.getGraphHeads() .filter(new IdInBroadcast<>()) .withBroadcastSet(graphIds, IdInBroadcast.IDS); return selectVerticesAndEdges(collection, graphHeads); } DistinctByIsomorphism(); }
DistinctByIsomorphism extends GroupByIsomorphism<G, V, E, LG, GC> { @Override public GC execute(GC collection) { DataSet<GradoopId> graphIds = getCanonicalLabels(collection) .distinct(1) .map(new IdFromGraphHeadString()); DataSet<G> graphHeads = collection.getGraphHeads() .filter(new IdInBroadcast<>()) .withBroadcastSet(graphIds, IdInBroadcast.IDS); return selectVerticesAndEdges(collection, graphHeads); } DistinctByIsomorphism(); @Override GC execute(GC collection); }
DistinctByIsomorphism extends GroupByIsomorphism<G, V, E, LG, GC> { @Override public GC execute(GC collection) { DataSet<GradoopId> graphIds = getCanonicalLabels(collection) .distinct(1) .map(new IdFromGraphHeadString()); DataSet<G> graphHeads = collection.getGraphHeads() .filter(new IdInBroadcast<>()) .withBroadcastSet(graphIds, IdInBroadcast.IDS); return selectVerticesAndEdges(collection, graphHeads); } DistinctByIsomorphism(); @Override GC execute(GC collection);  }