24 package org.lightjason.agentspeak.action.builtin.math.statistic;
28 import javax.annotation.Nonnull;
29 import java.util.List;
30 import java.util.stream.Collectors;
31 import java.util.stream.Stream;
53 protected final List<Double>
weight( @Nonnull
final List<?> p_items, @Nonnull
final Stream<Double> p_values, @Nonnull
final List<ITerm> p_argument )
55 final double l_demand = p_argument.get( 0 ).<Number>raw().doubleValue();
56 return p_values.map( i -> Math.exp( i / l_demand ) ).collect( Collectors.toList() );
static final long serialVersionUID
serial id
abstract class for creating a selection one element of a list based on a fitness weight ...
final List< Double > weight( @Nonnull final List<?> p_items, @Nonnull final Stream< Double > p_values, @Nonnull final List< ITerm > p_argument)
action to define a fitness-proportinate-selection mechanism.
final int additionalArgumentNumber()