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.StatisticalSummary;
28 import org.apache.commons.math3.stat.descriptive.SummaryStatistics;
36 import javax.annotation.Nonnegative;
37 import javax.annotation.Nonnull;
38 import java.util.Arrays;
39 import java.util.List;
40 import java.util.stream.Collectors;
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() );
81 final double[] l_values = l_arguments.parallelStream()
83 .map(
ITerm::<Number>raw )
84 .mapToDouble( Number::doubleValue ).toArray();
87 l_arguments.parallelStream()
94 Arrays.stream( l_values ).forEach( j -> i.<SummaryStatistics>raw().addValue( j ) );
100 Arrays.stream( l_values ).forEach( j -> i.<DescriptiveStatistics>raw().addValue( j ) );
final int minimalArgumentNumber()
minimum number of arguments
base class of build-in actions for setting name by package/classname (without prefix character) ...
action to push a values to the statistic object.
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
common structure for execution definition
execution context with local data
static Stream< ITerm > flatten( @Nonnull final Collection<? extends ITerm > p_terms)
flat term-in-term collection into a straight term list
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< 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 final long serialVersionUID
serial id