-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathopenfst_weights.i
55 lines (51 loc) · 2.46 KB
/
openfst_weights.i
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
%feature("docstring",
"Standard weight class, using floating-point values in the tropical semiring.") Weight;
struct Weight {
%feature("docstring", "Get the floating-point value of a weight.");
float Value();
%feature("docstring",
"Returns the zero weight for this semiring. This is the weight which\n"
"acts as an annihilator for multiplication and an identity for addition.\n"
"For the standard weight class, its value is positive infinity.");
static Weight const Zero();
%feature("docstring",
"Returns the one value for this semiring. This is the weight which\n"
"acts as an identity for multiplication.\n"
"For the standard weight class, its value is zero.");
static Weight const One();
};
%feature("docstring",
"Standard weight class, using floating-point values in the log semiring.") LogWeight;
class LogWeight {
public:
%feature("docstring", "Get the floating-point value of a weight.");
float Value();
%feature("docstring",
"Returns the zero weight for this semiring. This is the weight which\n"
"acts as an annihilator for multiplication and an identity for addition.\n"
"For the standard weight class, its value is positive infinity.");
static LogWeight const Zero();
%feature("docstring",
"Returns the one value for this semiring. This is the weight which\n"
"acts as an identity for multiplication.\n"
"For the standard weight class, its value is zero.");
static LogWeight const One();
};
%feature("docstring",
"Standard weight class, using floating-point values in the log semiring.") LogWeight;
class Log64Weight {
public:
%feature("docstring", "Get the floating-point value of a weight.");
double Value();
%feature("docstring",
"Returns the zero weight for this semiring. This is the weight which\n"
"acts as an annihilator for multiplication and an identity for addition.\n"
"For the standard weight class, its value is positive infinity.");
static Log64Weight const Zero();
%feature("docstring",
"Returns the one value for this semiring. This is the weight which\n"
"acts as an identity for multiplication.\n"
"For the standard weight class, its value is zero.");
static Log64Weight const One();
};