mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-04 18:20:14 +00:00
use hasSplitFleetContiguousScoring to determine that the fleet pertinence doesn't decide rank
This commit is contained in:
1 parent
c69e31a994
commit
5b98647cec
5 files changed
+10
-9
No files matched your search
+1
@@ -1073,6 +1073,7 @@ public class LeaderboardScoringAndRankingTest extends AbstractLeaderboardTest {
|
||||
List<String> finalRaceColumnNames = new ArrayList<String>();
|
||||
finalRaceColumnNames.add("F");
|
||||
Series finalSeries = new SeriesImpl("Final", /* isMedal */false, finalFleets, finalRaceColumnNames, /* trackedRegattaRegistry */ null);
|
||||
finalSeries.setSplitFleetContiguousScoring(true);
|
||||
series.add(finalSeries);
|
||||
}
|
||||
// -------- after series ------------
|
||||
|
||||
@@ -226,5 +226,5 @@ public interface RaceColumn extends Named {
|
||||
* rank in the fleet's race; or the scoring scheme is applied to each fleet separately, leading to the best score being awarded
|
||||
* in the column as many times as there are fleets in the column. For the latter case, this method returns <code>true</code>.
|
||||
*/
|
||||
boolean hasSplitFleetScore();
|
||||
boolean hasSplitFleetContiguousScoring();
|
||||
}
|
||||
+1
-1
@@ -116,7 +116,7 @@ public class RaceColumnInSeriesImpl extends AbstractRaceColumn implements RaceCo
|
||||
* Delegates to {@link Series#hasSplitFleetContiguousScoring()}.
|
||||
*/
|
||||
@Override
|
||||
public boolean hasSplitFleetScore() {
|
||||
public boolean hasSplitFleetContiguousScoring() {
|
||||
return getSeries().hasSplitFleetContiguousScoring();
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -96,18 +96,18 @@ public abstract class SimpleAbstractRaceColumn implements RaceColumn {
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements this by delegating to {@link #hasSplitFleetScore()}. This is a reasonable default implementation because
|
||||
* if the score is not split up by fleet but scored contiguously ascending/descending, this usually means that the
|
||||
* fleets re-convene after this series instead of remaining split.
|
||||
* Implements this by delegating to and negating the result of {@link #hasSplitFleetContiguousScoring()}. This is a
|
||||
* reasonable default implementation because if the score is not split up by fleet but scored contiguously
|
||||
* ascending/descending, this usually means that the fleets re-convene after this series instead of remaining split.
|
||||
*/
|
||||
@Override
|
||||
public boolean isTotalOrderDefinedByFleet() {
|
||||
return hasSplitFleetScore();
|
||||
return !hasSplitFleetContiguousScoring();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSplitFleetScore() {
|
||||
return true;
|
||||
public boolean hasSplitFleetContiguousScoring() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -49,7 +49,7 @@ public interface ScoringScheme extends Serializable {
|
||||
* the competitor participated, <code>null</code> is returned, meaning the competitor has no score assigned for that
|
||||
* race.
|
||||
*
|
||||
* FIXME Bug 1260: if the raceColumn does not have {@link RaceColumn#hasSplitFleetScore()}, the competitors of all better fleets need to be counted and the sum of these counts need to be added to the rank before evaluating the score for the rank
|
||||
* FIXME Bug 1260: if the raceColumn does not have {@link RaceColumn#hasSplitFleetContiguousScoring()}, the competitors of all better fleets need to be counted and the sum of these counts need to be added to the rank before evaluating the score for the rank
|
||||
*/
|
||||
Double getScoreForRank(RaceColumn raceColumn, Competitor competitor, int rank, Callable<Integer> numberOfCompetitorsInRaceFetcher);
|
||||
|
||||
|
||||
Reference in new issue
Block a user