class OverlapWeightFunction implements ViolationWeightFunction {

    @Override
    public double getWeight(Overlap violation, Overlaps overlaps, Model model) {
        int violationSize = violation.getSize();
        int patternSize = violation.getPattern().getSize();
        return violationSize / (float) patternSize;
    }

}