-
Notifications
You must be signed in to change notification settings - Fork 5
/
MeanLevenshtein.java
39 lines (32 loc) · 1.22 KB
/
MeanLevenshtein.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package org.genericsystem.cv.model;
import org.genericsystem.api.core.annotations.Components;
import org.genericsystem.api.core.annotations.InstanceClass;
import org.genericsystem.api.core.annotations.SystemGeneric;
import org.genericsystem.api.core.annotations.constraints.PropertyConstraint;
import org.genericsystem.common.Generic;
import org.genericsystem.cv.model.Score.ScoreInstance;
import org.genericsystem.cv.model.MeanLevenshtein.MeanLevenshteinInstance;
/**
* This class stores the mean levenshtein distance for a given
* {@link ZoneGeneric} and {@link ImgFilter}
*
* @author Pierrik Lassalas
*
*/
@SystemGeneric
@PropertyConstraint
@Components({ Score.class })
@InstanceClass(MeanLevenshteinInstance.class)
public class MeanLevenshtein implements Generic {
public static class MeanLevenshteinInstance implements Generic {
public ScoreInstance getScore() {
return (ScoreInstance) this.getBaseComponent();
}
}
public MeanLevenshteinInstance addMeanLev(Float meanValue, ScoreInstance scoreInstance) {
return (MeanLevenshteinInstance) setInstance(meanValue, scoreInstance);
}
public MeanLevenshteinInstance getMeanLev(ScoreInstance scoreInstance) {
return (MeanLevenshteinInstance) getInstance(scoreInstance);
}
}