/** * Translate {@link Edge} values using the given {@link MapFunction}. * * @param translator implements conversion from {@code EV} to {@code NEW} * @param <NEW> new edge value type * @return graph with translated edge values * @throws Exception */ public <NEW> Graph<K, VV, NEW> translateEdgeValues(TranslateFunction<EV, NEW> translator) throws Exception { return run(new TranslateEdgeValues<>(translator)); }
/** * Translate {@link Edge} values using the given {@link MapFunction}. * * @param translator implements conversion from {@code EV} to {@code NEW} * @param <NEW> new edge value type * @return graph with translated edge values * @throws Exception */ public <NEW> Graph<K, VV, NEW> translateEdgeValues(TranslateFunction<EV, NEW> translator) throws Exception { return run(new TranslateEdgeValues<>(translator)); }
/** * Translate {@link Edge} values using the given {@link MapFunction}. * * @param translator implements conversion from {@code EV} to {@code NEW} * @param <NEW> new edge value type * @return graph with translated edge values * @throws Exception */ public <NEW> Graph<K, VV, NEW> translateEdgeValues(TranslateFunction<EV, NEW> translator) throws Exception { return run(new TranslateEdgeValues<K, VV, EV, NEW>(translator)); }
/** * Translate {@link Edge} values using the given {@link MapFunction}. * * @param translator implements conversion from {@code EV} to {@code NEW} * @param <NEW> new edge value type * @return graph with translated edge values * @throws Exception */ public <NEW> Graph<K, VV, NEW> translateEdgeValues(TranslateFunction<EV, NEW> translator) throws Exception { return run(new TranslateEdgeValues<>(translator)); }