Package microsim.alignment.probability
Class SidewalkAlignment<T>
java.lang.Object
microsim.alignment.probability.SidewalkAlignment<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
AlignmentUtils<T>
set individual probability to 1 if there is a change of the integer part of the cumulated probability, 0 otherwise
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
align
(@NonNull Collection<T> agents, @Nullable org.apache.commons.collections4.Predicate<T> filter, @NonNull AlignmentProbabilityClosure<T> closure, double targetProbability) The method calibrates the probabilities through nonlinear transformation in order to confine the probability within the range of 0 and 1.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface microsim.alignment.AlignmentUtils
extractAgentList, validateProbabilityValue
-
Constructor Details
-
SidewalkAlignment
public SidewalkAlignment()
-
-
Method Details
-
align
public void align(@NonNull @NonNull Collection<T> agents, @Nullable @Nullable org.apache.commons.collections4.Predicate<T> filter, @NonNull @NonNull AlignmentProbabilityClosure<T> closure, double targetProbability) The method calibrates the probabilities through nonlinear transformation in order to confine the probability within the range of 0 and 1.- Parameters:
agents
- A collection of agents.filter
- A logical filter to filter out agents that don't match certain criteria, can be null.closure
- A closure to manipulate probabilities of the agents.targetProbability
- The target probability value that the method converges to.- Throws:
NullPointerException
- whenagents
, orclosure
, or both arenull
.
-