24 package org.lightjason.agentspeak.action.builtin.math.statistic;
26 import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
27 import org.apache.commons.math3.stat.descriptive.SummaryStatistics;
36 import javax.annotation.Nonnegative;
37 import javax.annotation.Nonnull;
38 import java.util.List;
39 import java.util.stream.Collectors;
76 @SuppressWarnings(
"unchecked" )
78 @Nonnull final List<
ITerm> p_argument, @Nonnull final List<
ITerm> p_return )
80 final List<ITerm> l_arguments =
CCommon.
flatten( p_argument ).collect( Collectors.toList() );
89 return l_value.
value( i.<SummaryStatistics>raw() );
91 return l_value.
value( i.<DescriptiveStatistics>raw() );
96 .forEach( p_return::add );
base class of build-in actions for setting name by package/classname (without prefix character) ...
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
common structure for execution definition
final int minimalArgumentNumber()
minimum number of arguments
gets a single statistic value of multiple statistic objects.
execution context with local data
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
static Stream< ITerm > flatten( @Nonnull final Collection<? extends ITerm > p_terms)
flat term-in-term collection into a straight term list
static< T > boolean rawvalueAssignableTo( @Nonnull final T p_value, @Nonnull final Class<?>... p_class)
checks a term value for assignable class
result for an immutable fuzzy value
static< N > CRawTerm< N > from(final N p_value)
factory for a raw term
static final long serialVersionUID
serial id
CSingleStatisticValue()
ctor
static EStatisticValue from( @Nonnull final String p_value)
additional factory
final double value( @Nonnull final SummaryStatistics p_statistic)
returns a statistic value
enum of statistic value types
term structure for simple datatypes