LightJason - AgentSpeak(L++)
org.lightjason.agentspeak.action.builtin.graph.CDistancePath Class Reference

calculates the distance of two vertices within each graph instance. More...

+ Inheritance diagram for org.lightjason.agentspeak.action.builtin.graph.CDistancePath:
+ Collaboration diagram for org.lightjason.agentspeak.action.builtin.graph.CDistancePath:

Protected Member Functions

final Object apply ( @Nonnull final List< ITerm > p_vertices, @Nonnull final Graph< Object, Object > p_graph, @Nonnull final Function< Object, Number > p_weightfunction)
 
- Protected Member Functions inherited from org.lightjason.agentspeak.action.builtin.graph.IApplyPathAlgorithm
abstract Object apply ( @Nonnull final List< ITerm > p_vertices, @Nonnull final Graph< Object, Object > p_graph, @Nonnull final Function< Object, Number > p_weightfunction)
 apply function More...
 
- Protected Member Functions inherited from org.lightjason.agentspeak.action.builtin.IBuiltinAction
 IBuiltinAction ()
 ctor More...
 
 IBuiltinAction (final int p_length)
 ctor More...
 

Static Private Attributes

static final long serialVersionUID = 2146213818742863048L
 serial id More...
 

Additional Inherited Members

- Public Member Functions inherited from org.lightjason.agentspeak.action.builtin.graph.IApplyPathAlgorithm
final IFuzzyValue< Boolean > execute (final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
 defines a plan-body operation More...
 
final int minimalArgumentNumber ()
 minimum number of arguments More...
 
- Public Member Functions inherited from org.lightjason.agentspeak.action.builtin.IBuiltinAction
final IPath name ()
 returns the name with path of the action More...
 
- Public Member Functions inherited from org.lightjason.agentspeak.action.IBaseAction
final boolean equals (final Object p_object)
 
final int hashCode ()
 
final String toString ()
 
- Public Member Functions inherited from org.lightjason.agentspeak.action.IAction
default Stream< IVariable<?> > variables ()
 returns a stream with all used variables More...
 
- Public Attributes inherited from org.lightjason.agentspeak.action.IAction
long serialVersionUID = -6374480398439703170L
 serial id More...
 
- Static Protected Attributes inherited from org.lightjason.agentspeak.action.builtin.IBuiltinAction
static final Logger LOGGER = CCommon.logger( IBuiltinAction.class )
 logger More...
 
- Static Protected Attributes inherited from org.lightjason.agentspeak.action.IBaseAction
static final Logger LOGGER = org.lightjason.agentspeak.common.CCommon.logger( IAction.class )
 logger More...
 

Detailed Description

The ordering of the arguments can be arbitrary, for any graph instance the distance path is calculated, the first map instance will be used as weight-map, a tuple of the string "defaultweight" and a numeric value defines the default weight value of the weight-map (the default value is zero), a tuple which will not fit this definition defines the start- and end-vertex, the action fails on wrong input. The weight-map does not need an entry for each edge non-existing edges have got on default zero weight

[D1|D2] = graph/distancepath( StartVertex, EndVertex, Graph1, Graph2 );
[D3|D4] = graph/distancepath( "defaultweight", 3, CostMap, StartVertex, EndVertex, Graph1, Graph2 );

Definition at line 51 of file CDistancePath.java.

Member Function Documentation

◆ apply()

final Object org.lightjason.agentspeak.action.builtin.graph.CDistancePath.apply ( @Nonnull final List< ITerm p_vertices,
@Nonnull final Graph< Object, Object >  p_graph,
@Nonnull final Function< Object, Number >  p_weightfunction 
)
protected

Definition at line 59 of file CDistancePath.java.

Member Data Documentation

◆ serialVersionUID

final long org.lightjason.agentspeak.action.builtin.graph.CDistancePath.serialVersionUID = 2146213818742863048L
staticprivate

Definition at line 56 of file CDistancePath.java.