@Test public void testReturnNothingForShortsResults() throws Exception { List<Embedding> result = new ArrayList<>(); new PostProcessExpandEmbedding(3, -1).flatMap(expandEmbedding(), new ListCollector<>(result)); assertEquals(0, result.size()); }
@Override public void flatMap(ExpandEmbedding value, Collector<Embedding> out) throws Exception { if (value.pathSize() < minPathLength) { return; } if (closingColumn >= 0 && !value.getBase().getId(closingColumn).equals(value.getEnd())) { return; } out.collect(value.toEmbedding()); }
PostProcessExpandEmbedding extends RichFlatMapFunction<ExpandEmbedding, Embedding> { @Override public void flatMap(ExpandEmbedding value, Collector<Embedding> out) throws Exception { if (value.pathSize() < minPathLength) { return; } if (closingColumn >= 0 && !value.getBase().getId(closingColumn).equals(value.getEnd())) { return; } out.collect(value.toEmbedding()); } }
PostProcessExpandEmbedding extends RichFlatMapFunction<ExpandEmbedding, Embedding> { @Override public void flatMap(ExpandEmbedding value, Collector<Embedding> out) throws Exception { if (value.pathSize() < minPathLength) { return; } if (closingColumn >= 0 && !value.getBase().getId(closingColumn).equals(value.getEnd())) { return; } out.collect(value.toEmbedding()); } PostProcessExpandEmbedding(int lowerBound, int closingColumn); }
PostProcessExpandEmbedding extends RichFlatMapFunction<ExpandEmbedding, Embedding> { @Override public void flatMap(ExpandEmbedding value, Collector<Embedding> out) throws Exception { if (value.pathSize() < minPathLength) { return; } if (closingColumn >= 0 && !value.getBase().getId(closingColumn).equals(value.getEnd())) { return; } out.collect(value.toEmbedding()); } PostProcessExpandEmbedding(int lowerBound, int closingColumn); @Override void flatMap(ExpandEmbedding value, Collector<Embedding> out); }
PostProcessExpandEmbedding extends RichFlatMapFunction<ExpandEmbedding, Embedding> { @Override public void flatMap(ExpandEmbedding value, Collector<Embedding> out) throws Exception { if (value.pathSize() < minPathLength) { return; } if (closingColumn >= 0 && !value.getBase().getId(closingColumn).equals(value.getEnd())) { return; } out.collect(value.toEmbedding()); } PostProcessExpandEmbedding(int lowerBound, int closingColumn); @Override void flatMap(ExpandEmbedding value, Collector<Embedding> out);  }