public abstract class OrdinalStatisticalTest extends java.lang.Object implements StatisticalTest
RankedObservation
objects and
updating their ranks.Modifier and Type | Field and Description |
---|---|
protected java.util.Comparator<RankedObservation> |
comparator
The comparator used for ordering observations.
|
protected java.util.List<RankedObservation> |
data
Collection of all ranked observations added to this test.
|
protected int |
numberOfGroups
The number of groups being tested.
|
Constructor and Description |
---|
OrdinalStatisticalTest(int numberOfGroups)
Constructs a new ordinal (rank-based) statistical test for the specified
number of groups.
|
OrdinalStatisticalTest(int numberOfGroups,
java.util.Comparator<RankedObservation> comparator)
Constructs a new ordinal (rank-based) statistical test for the specified
number of groups and the comparator for ordering observations.
|
Modifier and Type | Method and Description |
---|---|
protected void |
add(double value,
int group)
Adds a new observation with the specified value and group.
|
protected void |
addAll(double[] values,
int group)
Adds several new observations to the specified group.
|
java.util.Comparator<RankedObservation> |
getComparator()
Returns the comparator used by this test to order observations.
|
int |
getNumberOfGroups()
Returns the number of groups being tested.
|
int |
size()
Returns the number of observations used in this test.
|
protected void |
update()
Sorts the observations using the
comparator and assigns ranks. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
test
protected final int numberOfGroups
protected final java.util.Comparator<RankedObservation> comparator
protected final java.util.List<RankedObservation> data
public OrdinalStatisticalTest(int numberOfGroups)
numberOfGroups
- the number of groups being testedpublic OrdinalStatisticalTest(int numberOfGroups, java.util.Comparator<RankedObservation> comparator)
numberOfGroups
- the number of groups being testedcomparator
- the comparator for ordering observationsprotected void add(double value, int group)
value
- the value of the new observationgroup
- the group to which the new observation belongsprotected void addAll(double[] values, int group)
values
- the values of the new observationsgroup
- the group to which the new observations belongprotected void update()
comparator
and assigns ranks.public int size()
public int getNumberOfGroups()
public java.util.Comparator<RankedObservation> getComparator()
Copyright 2009-2024 David Hadka and other contributors. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage.