Class MaxDiffFilter
java.lang.Object
nl.tudelft.simulation.language.filters.AbstractFilter
nl.tudelft.simulation.jstats.filters.MaxDiffFilter
- All Implemented Interfaces:
Serializable
,FilterInterface
The MaxDiffFilter accepts entries if their value is larger than the percentage of the last received Value.
Copyright (c) 2004-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Author:
- Peter Jacobs , Alexander Verbraeck
- See Also:
-
Field Summary
Fields inherited from class nl.tudelft.simulation.language.filters.AbstractFilter
inverted
-
Constructor Summary
ConstructorDescriptionMaxDiffFilter
(double acceptedDifferencePercentage) constructs a new MaxDiffFilter. -
Method Summary
Modifier and TypeMethodDescriptionboolean
filters based on the maximum difference.Methods inherited from class nl.tudelft.simulation.language.filters.AbstractFilter
accept, and, isInverted, or, setInverted, toString
-
Constructor Details
-
MaxDiffFilter
public MaxDiffFilter(double acceptedDifferencePercentage) constructs a new MaxDiffFilter.- Parameters:
acceptedDifferencePercentage
- double; the maximum accepted difference percentage, e.g. 10%
-
-
Method Details
-
filter
filters based on the maximum difference.- Specified by:
filter
in classAbstractFilter
- Parameters:
entry
- Object; we expect a double[2] representing x,y as input.- Returns:
- whether to accept the entry
- See Also:
-
getCriterion
- Specified by:
getCriterion
in interfaceFilterInterface
- Specified by:
getCriterion
in classAbstractFilter
-