/** * Translate {@link Vertex} and {@link Edge} IDs using the given {@link MapFunction}. * * @param translator implements conversion from {@code K} to {@code NEW} * @param <NEW> new ID type * @return graph with translated vertex and edge IDs * @throws Exception */ public <NEW> Graph<NEW, VV, EV> translateGraphIds(TranslateFunction<K, NEW> translator) throws Exception { return run(new TranslateGraphIds<>(translator)); }
return input; } else { return (Graph<?, VV, EV>) input.run(new TranslateGraphIds(translator));
/** * Translate {@link Vertex} and {@link Edge} IDs using the given {@link MapFunction}. * * @param translator implements conversion from {@code K} to {@code NEW} * @param <NEW> new ID type * @return graph with translated vertex and edge IDs * @throws Exception */ public <NEW> Graph<NEW, VV, EV> translateGraphIds(TranslateFunction<K, NEW> translator) throws Exception { return run(new TranslateGraphIds<>(translator)); }
/** * Translate {@link Vertex} and {@link Edge} IDs using the given {@link MapFunction}. * * @param translator implements conversion from {@code K} to {@code NEW} * @param <NEW> new ID type * @return graph with translated vertex and edge IDs * @throws Exception */ public <NEW> Graph<NEW, VV, EV> translateGraphIds(TranslateFunction<K, NEW> translator) throws Exception { return run(new TranslateGraphIds<K, NEW, VV, EV>(translator)); }
/** * Translate {@link Vertex} and {@link Edge} IDs using the given {@link MapFunction}. * * @param translator implements conversion from {@code K} to {@code NEW} * @param <NEW> new ID type * @return graph with translated vertex and edge IDs * @throws Exception */ public <NEW> Graph<NEW, VV, EV> translateGraphIds(TranslateFunction<K, NEW> translator) throws Exception { return run(new TranslateGraphIds<>(translator)); }