Difference: FstConventions (1 vs. 18)

Revision 182019-02-20 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 19 to 19
 
  1. A reference/pointer to an arc is invalidated at the next operation on an FST, state iterator, arc iterator, or matcher.
  2. State iterators, arc iterators and matchers should be destroyed prior to destroying their component FSTs.
  3. All FST classes F implement a copy constructor F(const &F).
Changed:
<
<
  1. The copy constructor and Copy() method of an FST have constant time and space complexity (shallow copy) unless otherwise noted.
>
>
  1. The copy constructor and Copy() method of an FST have constant time and space complexity (shallow copy) unless otherwise noted.'
  2. One or more stored FST properties may be set to unknown once an FST is mutated depending on the type of mutation.
 

Coding Conventions

Revision 172018-01-10 - KyleGorman

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 18 to 18
 
  1. A Matcher is invalidated by any mutation of an FST.
  2. A reference/pointer to an arc is invalidated at the next operation on an FST, state iterator, arc iterator, or matcher.
  3. State iterators, arc iterators and matchers should be destroyed prior to destroying their component FSTs.
Changed:
<
<
  1. All Fst classes F implement a copy constructor F(const &F).
>
>
  1. All FST classes F implement a copy constructor F(const &F).
 
  1. The copy constructor and Copy() method of an FST have constant time and space complexity (shallow copy) unless otherwise noted.

Coding Conventions

Line: 31 to 31
 
    • Weight for weights.

New FST classes:

Changed:
<
<
  1. All Fst classes will implement working versions of all pure virtual member functions; writing dummy or error-raising versions is not permitted.
>
>
  1. All FST classes will implement working versions of all pure virtual member functions; writing dummy or error-raising versions is not permitted.
 
  1. If class C is templated on an Arc, then C::Arc will give that type.
\ No newline at end of file

Revision 162017-07-26 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 12 to 12
 
  1. The empty machine (no states) has start state kNoStateId; a non-empty machine (has states) has a valid start state.
  2. A Label is a non-negative integer except kNoLabel (or library internals). The label 0 is reserved for epsilon.
  3. A Weight satisfies the properties described here.
Deleted:
<
<
  1. Arc weights satisfy the property that the sum of the weights of one or more paths from some state S to T is never Zero(). In particular, arc weights are never Zero().
 
  1. A StateIterator is invalidated if the number of states is modified.
  2. An ArcIterator for a state is invalidated by any mutation of the arcs at that state.
  3. A MutableArcIterator is invalidated by any mutation of the arcs at that state other than by the iterator itself.

Revision 152016-03-03 - KyleGorman

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 17 to 17
 
  1. An ArcIterator for a state is invalidated by any mutation of the arcs at that state.
  2. A MutableArcIterator is invalidated by any mutation of the arcs at that state other than by the iterator itself.
  3. A Matcher is invalidated by any mutation of an FST.
Changed:
<
<
  1. A reference/pointer to an arc is invalidated at the next Fst, state iterator, arc iterator or matcher operation.
  2. State iteratores, arc iterators and matchers should be destroyed prior to destroying their component FSTs.
>
>
  1. A reference/pointer to an arc is invalidated at the next operation on an FST, state iterator, arc iterator, or matcher.
  2. State iterators, arc iterators and matchers should be destroyed prior to destroying their component FSTs.
 
  1. All Fst classes F implement a copy constructor F(const &F).
  2. The copy constructor and Copy() method of an FST have constant time and space complexity (shallow copy) unless otherwise noted.

Revision 142016-03-03 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 16 to 16
 
  1. A StateIterator is invalidated if the number of states is modified.
  2. An ArcIterator for a state is invalidated by any mutation of the arcs at that state.
  3. A MutableArcIterator is invalidated by any mutation of the arcs at that state other than by the iterator itself.
Changed:
<
<
  1. A reference/pointer to an arc is invalidated at the next Fst, state or arc iterator operation.
  2. State and arc iterators should be destroyed prior to destroying their component FSTs.
>
>
  1. A Matcher is invalidated by any mutation of an FST.
  2. A reference/pointer to an arc is invalidated at the next Fst, state iterator, arc iterator or matcher operation.
  3. State iteratores, arc iterators and matchers should be destroyed prior to destroying their component FSTs.
 
  1. All Fst classes F implement a copy constructor F(const &F).
  2. The copy constructor and Copy() method of an FST have constant time and space complexity (shallow copy) unless otherwise noted.

Revision 132012-01-05 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 7 to 7
 

Object Conventions

  1. The StateIds of an FST are dense integers, numbered from 0 to NumStates() - 1.
Changed:
<
<
  1. A StateIterator returns StateIds in numerical order.
  2. A user may not request info about a StateId s from an FST unless the FST has already returned a StateId ts (e.g. from Start(), NumStates(), StateIterator, or ArcIterator->Value().nextstate).
  3. The empty machine (no states) has start state kNoStateId; a non-empty machine (has states) has a valid start state.
  4. Labels are non-negative integers except kNoLabel (or library internals). The label 0 is reserved for epsilon.
  5. Weights satisfy the properties described here.
  6. Arc weights satisfy the property that the sum of the weights of one or more paths from some state S to T is never Zero(). In particular, arc weights are never Zero().
  7. State iterators are invalidated if the number of states is modified.
  8. Arc iterators are invalidated if the number of states or arcs is modified.
  9. A reference/pointer to an arc is invalidated at the next Fst, state or arc iterator operation.
  10. State and arc iterators should be destroyed prior to destroying their component FSTs.
  11. All Fst classes F implement a copy constructor F(const &F).
  12. The copy constructor and Copy() method of an FST have constant time and space complexity (shallow copy) unless otherwise noted.
>
>
  1. A StateIterator returns StateIds in numerical order.
  2. A user may not request info about a StateId s from an FST unless the FST has already returned a StateId ts (e.g. from Start(), NumStates(), StateIterator, or ArcIterator->Value().nextstate).
  3. The empty machine (no states) has start state kNoStateId; a non-empty machine (has states) has a valid start state.
  4. A Label is a non-negative integer except kNoLabel (or library internals). The label 0 is reserved for epsilon.
  5. A Weight satisfies the properties described here.
  6. Arc weights satisfy the property that the sum of the weights of one or more paths from some state S to T is never Zero(). In particular, arc weights are never Zero().
  7. A StateIterator is invalidated if the number of states is modified.
  8. An ArcIterator for a state is invalidated by any mutation of the arcs at that state.
  9. A MutableArcIterator is invalidated by any mutation of the arcs at that state other than by the iterator itself.
  10. A reference/pointer to an arc is invalidated at the next Fst, state or arc iterator operation.
  11. State and arc iterators should be destroyed prior to destroying their component FSTs.
  12. All Fst classes F implement a copy constructor F(const &F).
  13. The copy constructor and Copy() method of an FST have constant time and space complexity (shallow copy) unless otherwise noted.
 

Coding Conventions

Revision 122011-02-01 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 8 to 8
 
  1. The StateIds of an FST are dense integers, numbered from 0 to NumStates() - 1.
  2. A StateIterator returns StateIds in numerical order.
Changed:
<
<
  1. A user may not request info about a StateId s from an FST unless the FST has already returned a StateId t >= s (e.g. from Start(), NumStates(), StateIterator, or ArcIterator->Value().nextstate).
>
>
  1. A user may not request info about a StateId s from an FST unless the FST has already returned a StateId ts (e.g. from Start(), NumStates(), StateIterator, or ArcIterator->Value().nextstate).
 
  1. The empty machine (no states) has start state kNoStateId; a non-empty machine (has states) has a valid start state.
  2. Labels are non-negative integers except kNoLabel (or library internals). The label 0 is reserved for epsilon.
  3. Weights satisfy the properties described here.

Revision 112010-09-01 - CyrilAllauzen

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 9 to 9
 
  1. The StateIds of an FST are dense integers, numbered from 0 to NumStates() - 1.
  2. A StateIterator returns StateIds in numerical order.
  3. A user may not request info about a StateId s from an FST unless the FST has already returned a StateId t >= s (e.g. from Start(), NumStates(), StateIterator, or ArcIterator->Value().nextstate).
Changed:
<
<
  1. The empty machine (no states) has start state kNoState; a non-empty machine (has states) has a valid start state.
>
>
  1. The empty machine (no states) has start state kNoStateId; a non-empty machine (has states) has a valid start state.
 
  1. Labels are non-negative integers except kNoLabel (or library internals). The label 0 is reserved for epsilon.
  2. Weights satisfy the properties described here.
  3. Arc weights satisfy the property that the sum of the weights of one or more paths from some state S to T is never Zero(). In particular, arc weights are never Zero().

Revision 102010-08-10 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 32 to 32
 

New FST classes:

  1. All Fst classes will implement working versions of all pure virtual member functions; writing dummy or error-raising versions is not permitted.
  2. If class C is templated on an Arc, then C::Arc will give that type.
Deleted:
<
<
-- MichaelRiley - 25 May 2007
 \ No newline at end of file

Revision 92010-07-30 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 9 to 9
 
  1. The StateIds of an FST are dense integers, numbered from 0 to NumStates() - 1.
  2. A StateIterator returns StateIds in numerical order.
  3. A user may not request info about a StateId s from an FST unless the FST has already returned a StateId t >= s (e.g. from Start(), NumStates(), StateIterator, or ArcIterator->Value().nextstate).
Changed:
<
<
  1. The empty machine has start state kNoState.
>
>
  1. The empty machine (no states) has start state kNoState; a non-empty machine (has states) has a valid start state.
 
  1. Labels are non-negative integers except kNoLabel (or library internals). The label 0 is reserved for epsilon.
  2. Weights satisfy the properties described here.
  3. Arc weights satisfy the property that the sum of the weights of one or more paths from some state S to T is never Zero(). In particular, arc weights are never Zero().

Revision 82009-03-14 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 10 to 10
 
  1. A StateIterator returns StateIds in numerical order.
  2. A user may not request info about a StateId s from an FST unless the FST has already returned a StateId t >= s (e.g. from Start(), NumStates(), StateIterator, or ArcIterator->Value().nextstate).
  3. The empty machine has start state kNoState.
Changed:
<
<
  1. Labels are non-negative integers except kNoLabel (or library internals).
>
>
  1. Labels are non-negative integers except kNoLabel (or library internals). The label 0 is reserved for epsilon.
 
  1. Weights satisfy the properties described here.
  2. Arc weights satisfy the property that the sum of the weights of one or more paths from some state S to T is never Zero(). In particular, arc weights are never Zero().
  3. State iterators are invalidated if the number of states is modified.

Revision 72009-03-03 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 11 to 11
 
  1. A user may not request info about a StateId s from an FST unless the FST has already returned a StateId t >= s (e.g. from Start(), NumStates(), StateIterator, or ArcIterator->Value().nextstate).
  2. The empty machine has start state kNoState.
  3. Labels are non-negative integers except kNoLabel (or library internals).
Changed:
<
<
  1. Weights satisfy the properties described here.
>
>
  1. Weights satisfy the properties described here.
 
  1. Arc weights satisfy the property that the sum of the weights of one or more paths from some state S to T is never Zero(). In particular, arc weights are never Zero().
  2. State iterators are invalidated if the number of states is modified.
  3. Arc iterators are invalidated if the number of states or arcs is modified.

Revision 62007-06-27 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 18 to 18
 
  1. A reference/pointer to an arc is invalidated at the next Fst, state or arc iterator operation.
  2. State and arc iterators should be destroyed prior to destroying their component FSTs.
  3. All Fst classes F implement a copy constructor F(const &F).
Changed:
<
<
  1. The copy constructor and Copy() method of an FST have time and space complexity O(nstates_visited) (i.e., shallow copy) unless otherwise noted.
>
>
  1. The copy constructor and Copy() method of an FST have constant time and space complexity (shallow copy) unless otherwise noted.
 

Coding Conventions

Revision 52007-06-17 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 18 to 18
 
  1. A reference/pointer to an arc is invalidated at the next Fst, state or arc iterator operation.
  2. State and arc iterators should be destroyed prior to destroying their component FSTs.
  3. All Fst classes F implement a copy constructor F(const &F).
Changed:
<
<
  1. The copy constructor and Copy() have time and space complexity O(nstates_visited).
>
>
  1. The copy constructor and Copy() method of an FST have time and space complexity O(nstates_visited) (i.e., shallow copy) unless otherwise noted.
 

Coding Conventions

Revision 42007-06-16 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

OpenFst Conventions

Line: 18 to 18
 
  1. A reference/pointer to an arc is invalidated at the next Fst, state or arc iterator operation.
  2. State and arc iterators should be destroyed prior to destroying their component FSTs.
  3. All Fst classes F implement a copy constructor F(const &F).
Changed:
<
<
  1. The copy constructor and Copy() are constant time and space operations (typically reference-counted shallow copies).
>
>
  1. The copy constructor and Copy() have time and space complexity O(nstates_visited).
 

Coding Conventions

Revision 32007-05-25 - MichaelRiley

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Changed:
<
<

FST Conventions

The FST Libary has various conventions and assumptions about its objects and coding style.

>
>

OpenFst Conventions

 
Added:
>
>
The OpenFst Libary has various conventions and assumptions about its objects and coding style.
 

Object Conventions

Line: 12 to 11
 
  1. A user may not request info about a StateId s from an FST unless the FST has already returned a StateId t >= s (e.g. from Start(), NumStates(), StateIterator, or ArcIterator->Value().nextstate).
  2. The empty machine has start state kNoState.
  3. Labels are non-negative integers except kNoLabel (or library internals).
Changed:
<
<
  1. Weights satisfy the properties described here.
  2. State iterators are invalidated if the number of states is modified.
  3. Arc iterators are invalidated if the number of states or arcs is modified.
  4. A reference/pointer to an arc is invalidated at the next Fst, state or arc iterator operation.
  5. State and arc iterators should be destroyed prior to destroying their component FSTs.
  6. All Fst classes F implement a copy constructor F(const &F).
  7. The copy constructor and Copy() are constant time and space operations (typically reference-counted shallow copies).
>
>
  1. Weights satisfy the properties described here.
  2. Arc weights satisfy the property that the sum of the weights of one or more paths from some state S to T is never Zero(). In particular, arc weights are never Zero().
  3. State iterators are invalidated if the number of states is modified.
  4. Arc iterators are invalidated if the number of states or arcs is modified.
  5. A reference/pointer to an arc is invalidated at the next Fst, state or arc iterator operation.
  6. State and arc iterators should be destroyed prior to destroying their component FSTs.
  7. All Fst classes F implement a copy constructor F(const &F).
  8. The copy constructor and Copy() are constant time and space operations (typically reference-counted shallow copies).
 

Coding Conventions

Line: 30 to 30
 
    • Weight for weights.

New FST classes:

Changed:
<
<
  1. All Fst classes will implement working versions of all pure virtual member functions; writing dummy or error-raising versions not allowed.
>
>
  1. All Fst classes will implement working versions of all pure virtual member functions; writing dummy or error-raising versions is not permitted.
 
  1. If class C is templated on an Arc, then C::Arc will give that type.
Added:
>
>
-- MichaelRiley - 25 May 2007

Revision 22006-11-27 - CyrilAllauzen

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

FST Conventions

Line: 7 to 7
 

Object Conventions

Changed:
<
<
  1. The StateIds of an FST are dense, numbered from 0 to NumStates() - 1.
  2. A StateIterator returns StateIds in numerical order.
  3. A user may not request info about a StateId s from an FST unless the FST has already returned a StateId t >= s (e.g. from Start(), NumStates(), StateIterator, or ArcIterator->Value().nextstate).
  4. The empty machine has start state kNoState.
  5. Labels are non-negative except kNoLabel (or library internals).
  6. State iterators are invalidated if the number of states is modified.
  7. Arc iterators are invalidated if the number of states or arcs is modified.
  8. A reference/pointer to an arc is invalidated at the next Fst, state or arc iterator operation.
  9. State and arc iterators should be destroyed prior to destroying their component FSTs.
  10. All Fst classes F implement a copy constructor F(const &F).
  11. The copy constructor and Copy() are constant time and space operations (typically reference-counted shallow copies).
>
>
  1. The StateIds of an FST are dense integers, numbered from 0 to NumStates() - 1.
  2. A StateIterator returns StateIds in numerical order.
  3. A user may not request info about a StateId s from an FST unless the FST has already returned a StateId t >= s (e.g. from Start(), NumStates(), StateIterator, or ArcIterator->Value().nextstate).
  4. The empty machine has start state kNoState.
  5. Labels are non-negative integers except kNoLabel (or library internals).
  6. Weights satisfy the properties described here.
  7. State iterators are invalidated if the number of states is modified.
  8. Arc iterators are invalidated if the number of states or arcs is modified.
  9. A reference/pointer to an arc is invalidated at the next Fst, state or arc iterator operation.
  10. State and arc iterators should be destroyed prior to destroying their component FSTs.
  11. All Fst classes F implement a copy constructor F(const &F).
  12. The copy constructor and Copy() are constant time and space operations (typically reference-counted shallow copies).
 

Coding Conventions

Line: 30 to 31
 

New FST classes:

  1. All Fst classes will implement working versions of all pure virtual member functions; writing dummy or error-raising versions not allowed.
Changed:
<
<
  1. If class C is templated on an Arc, then C::Arc will give that type.

-- CyrilAllauzen - 21 Nov 2006

>
>
  1. If class C is templated on an Arc, then C::Arc will give that type.

Revision 12006-11-21 - CyrilAllauzen

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="WebHome"

FST Conventions

The FST Libary has various conventions and assumptions about its objects and coding style.

Object Conventions

  1. The StateIds of an FST are dense, numbered from 0 to NumStates() - 1.
  2. A StateIterator returns StateIds in numerical order.
  3. A user may not request info about a StateId s from an FST unless the FST has already returned a StateId t >= s (e.g. from Start(), NumStates(), StateIterator, or ArcIterator->Value().nextstate).
  4. The empty machine has start state kNoState.
  5. Labels are non-negative except kNoLabel (or library internals).
  6. State iterators are invalidated if the number of states is modified.
  7. Arc iterators are invalidated if the number of states or arcs is modified.
  8. A reference/pointer to an arc is invalidated at the next Fst, state or arc iterator operation.
  9. State and arc iterators should be destroyed prior to destroying their component FSTs.
  10. All Fst classes F implement a copy constructor F(const &F).
  11. The copy constructor and Copy() are constant time and space operations (typically reference-counted shallow copies).

Coding Conventions

FST Application Code:

  1. Your code should rarely use int or float when referring to FST components. Use:
    • StateId for state Ids and number of states.
    • Label for labels.
    • size_t for other array lengths.
    • Weight for weights.

New FST classes:

  1. All Fst classes will implement working versions of all pure virtual member functions; writing dummy or error-raising versions not allowed.
  2. If class C is templated on an Arc, then C::Arc will give that type.

-- CyrilAllauzen - 21 Nov 2006

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback