@Override
    public float eval(IRList l) {
        if (l == null || l.getQuery() == null || l.getPertinence() == null)
            return -1;

        ArrayList<Integer> relevants = l.getQuery().relevants;
        ArrayList<Integer> pertinence = l.getPertinence();
        int currentLevel = nbLevels, nRelevants = relevants.size(), nPertinence = pertinence.size();
        if (currentLevel > nRelevants)
            currentLevel = nRelevants;
        if (currentLevel > nPertinence)
            currentLevel = nPertinence;
        if (nRelevants == 0)
            return -1;
        if (currentLevel == 0)
            return 0;
        float nHit = 0.0f;
        for (int i = 0; i < currentLevel; i++){
            if (relevants.contains(pertinence.get(i))){
                nHit ++;
            }
        }

        return nHit / currentLevel;
    }