24 package org.lightjason.agentspeak.action.builtin.graph;
26 import com.google.common.base.Function;
27 import edu.uci.ics.jung.algorithms.shortestpath.DijkstraShortestPath;
28 import edu.uci.ics.jung.graph.Graph;
31 import javax.annotation.Nonnull;
32 import java.util.List;
58 protected final Object
apply( @Nonnull
final List<ITerm> p_vertices, @Nonnull
final Graph<Object, Object> p_graph,
59 @Nonnull
final Function<Object, Number> p_weightfunction )
61 return new DijkstraShortestPath<>( p_graph, p_weightfunction )
62 .getPath( p_vertices.get( 0 ).raw(), p_vertices.get( 1 ).raw() );
abstract class to define path / distance graph algorithms
static final long serialVersionUID
serial id
final Object apply( @Nonnull final List< ITerm > p_vertices, @Nonnull final Graph< Object, Object > p_graph, @Nonnull final Function< Object, Number > p_weightfunction)
calculates the edge list of the shortest path of two vertices within each graph instance.