blob: f3ec4cd8fb7fecf18697b53cb4d1ebb0a6e2bbb1 (
plain)
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
|
package org.grammaticalframework.pgf;
import java.io.Serializable;
/** Simply a pair of an expression and a probability value. */
public class ExprProb implements Serializable {
private static final long serialVersionUID = -3112602244416576742L;
private Expr expr;
private double prob;
public ExprProb(Expr expr, double prob) {
this.expr = expr;
this.prob = prob;
}
@SuppressWarnings("unused")
private static ExprProb mkExprProb(Pool pool, PGF gr, long expr, double prob) {
return new ExprProb(new Expr(pool, gr, expr), prob);
}
/** Returns the expression. */
public Expr getExpr() {
return expr;
}
/** Returns the negative logarithmic probability. */
public double getProb() {
return prob;
}
}
|