LightJason - AgentSpeak(L++)
org.lightjason.agentspeak.action.builtin.math.statistic.ISelection Class Referenceabstract

abstract class for creating a selection one element of a list based on a fitness weight More...

+ Inheritance diagram for org.lightjason.agentspeak.action.builtin.math.statistic.ISelection:
+ Collaboration diagram for org.lightjason.agentspeak.action.builtin.math.statistic.ISelection:

Public Member Functions

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...
 

Protected Member Functions

 ISelection ()
 ctor More...
 
int additionalArgumentNumber ()
 number of additional parameter More...
 
abstract List< Double > weight ( @Nonnull final List<?> p_items, @Nonnull final Stream< Double > p_values, @Nonnull final List< ITerm > p_argument)
 modifies the weights More...
 
- Protected Member Functions inherited from org.lightjason.agentspeak.action.builtin.IBuiltinAction
 IBuiltinAction ()
 ctor More...
 
 IBuiltinAction (final int p_length)
 ctor More...
 

Private Attributes

final Random m_random = new Random()
 random instance More...
 

Static Private Attributes

static final long serialVersionUID = -365949510289020495L
 serial id More...
 

Additional Inherited Members

- 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

Definition at line 46 of file ISelection.java.

Constructor & Destructor Documentation

◆ ISelection()

org.lightjason.agentspeak.action.builtin.math.statistic.ISelection.ISelection ( )
protected

Definition at line 60 of file ISelection.java.

Member Function Documentation

◆ additionalArgumentNumber()

int org.lightjason.agentspeak.action.builtin.math.statistic.ISelection.additionalArgumentNumber ( )
protected
Returns
additional number

Definition at line 129 of file ISelection.java.

Referenced by org.lightjason.agentspeak.action.builtin.math.statistic.ISelection.minimalArgumentNumber().

+ Here is the caller graph for this function:

◆ execute()

final IFuzzyValue<Boolean> org.lightjason.agentspeak.action.builtin.math.statistic.ISelection.execute ( final boolean  p_parallel,
@Nonnull final IContext  p_context,
@Nonnull final List< ITerm p_argument,
@Nonnull final List< ITerm p_return 
)
Parameters
p_parallelparallel execution
p_contextcurrent execution context
p_argumentparameter of the action
p_returnreturn values
Returns
fuzzy boolean

Implements org.lightjason.agentspeak.language.execution.IExecution.

Definition at line 75 of file ISelection.java.

References org.lightjason.agentspeak.language.CRawTerm< T >.from(), org.lightjason.agentspeak.language.fuzzy.CFuzzyValue< T >.from(), org.lightjason.agentspeak.language.CCommon.replaceFromContext(), and org.lightjason.agentspeak.action.builtin.math.statistic.ISelection.weight().

+ Here is the call graph for this function:

◆ minimalArgumentNumber()

final int org.lightjason.agentspeak.action.builtin.math.statistic.ISelection.minimalArgumentNumber ( )
Returns
number of minimal arguments

Implements org.lightjason.agentspeak.action.IAction.

Definition at line 67 of file ISelection.java.

References org.lightjason.agentspeak.action.builtin.math.statistic.ISelection.additionalArgumentNumber().

+ Here is the call graph for this function:

◆ weight()

abstract List<Double> org.lightjason.agentspeak.action.builtin.math.statistic.ISelection.weight ( @Nonnull final List<?>  p_items,
@Nonnull final Stream< Double >  p_values,
@Nonnull final List< ITerm p_argument 
)
abstractprotected
Parameters
p_itemsitem list
p_valuesstream of weights
p_argumentadditional arguments
Returns
list with weights

Referenced by org.lightjason.agentspeak.action.builtin.math.statistic.ISelection.execute().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_random

final Random org.lightjason.agentspeak.action.builtin.math.statistic.ISelection.m_random = new Random()
private

Definition at line 55 of file ISelection.java.

◆ serialVersionUID

final long org.lightjason.agentspeak.action.builtin.math.statistic.ISelection.serialVersionUID = -365949510289020495L
staticprivate

Definition at line 51 of file ISelection.java.