diff options
author | Alexander Gutkin <agutkin@google.com> | 2012-09-12 18:11:43 +0100 |
---|---|---|
committer | Alexander Gutkin <agutkin@google.com> | 2012-09-12 18:11:43 +0100 |
commit | dfd8b8327b93660601d016cdc6f29f433b45a8d8 (patch) | |
tree | 968ec84b8e32ad73ec18d74334930f36b7471906 /src/include/fst/weight.h | |
parent | f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2 (diff) | |
download | openfst-dfd8b8327b93660601d016cdc6f29f433b45a8d8.tar.gz |
Updated OpenFST version to openfst-1.3.2-CL32004048 from Greco3.
Change-Id: I19b0db718256b35c0e3e5a7315f1ed6335e6dcac
Diffstat (limited to 'src/include/fst/weight.h')
-rw-r--r-- | src/include/fst/weight.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/include/fst/weight.h b/src/include/fst/weight.h index 72f5a22..7eb4bb1 100644 --- a/src/include/fst/weight.h +++ b/src/include/fst/weight.h @@ -28,16 +28,18 @@ // A left semiring distributes on the left; a right semiring is // similarly defined. // -// A Weight class is required to be (at least) a left or right semiring. +// A Weight class must have binary functions =Plus= and =Times= and +// static member functions =Zero()= and =One()= and these must form +// (at least) a left or right semiring. // // In addition, the following should be defined for a Weight: // Member: predicate on set membership. -// NoWeight: returns an element that is not a member, should only be -// used to signal an error. -// >>: reads weight. -// <<: prints weight. -// Read(istream &strm): reads from an input stream. -// Write(ostream &strm): writes to an output stream. +// NoWeight: static member function that returns an element that is +// not a set member; used to signal an error. +// >>: reads textual representation of a weight. +// <<: prints textual representation of a weight. +// Read(istream &strm): reads binary representation of a weight. +// Write(ostream &strm): writes binary representation of a weight. // Hash: maps weight to size_t. // ApproxEqual: approximate equality (for inexact weights) // Quantize: quantizes wrt delta (for inexact weights) @@ -46,11 +48,9 @@ // and Times(a, b') == c // --> a' = Divide(c, b, DIVIDE_RIGHT) if a right semiring, a'.Member() // and Times(a', b) == c -// --> b' = Divide(c, a) -// = Divide(c, a, DIVIDE_ANY) -// = Divide(c, a, DIVIDE_LEFT) -// = Divide(c, a, DIVIDE_RIGHT) if a commutative semiring, -// b'.Member() and Times(a, b') == Times(b', a) == c +// --> b' = Divide(c, a) = Divide(c, a, DIVIDE_ANY) = +// Divide(c, a, DIVIDE_LEFT) = Divide(c, a, DIVIDE_RIGHT) if a +// commutative semiring, b'.Member() and Times(a, b') = Times(b', a) = c // ReverseWeight: the type of the corresponding reverse weight. // Typically the same type as Weight for a (both left and right) semiring. // For the left string semiring, it is the right string semiring. @@ -66,7 +66,7 @@ // RightSemiring: indicates weights form a right semiring. // Commutative: for all a,b: Times(a,b) == Times(b,a) // Idempotent: for all a: Plus(a, a) == a. -// Path Property: for all a, b: Plus(a, b) == a or Plus(a, b) == b. +// Path: for all a, b: Plus(a, b) == a or Plus(a, b) == b. #ifndef FST_LIB_WEIGHT_H__ |