class PatternSameSizeSupportWeightFunction implements ViolationWeightFunction {

    @Override
    public double getWeight(Overlap violation, Overlaps overlaps, Model model) {
        APIUsagePattern pattern = violation.getPattern();
        return pattern.getSupport() / (double) model.getMaxPatternSupport(pattern.getNodeSize());
    }

}