HFST - Helsinki Finite-State Transducer Technology - C++ API  version 3.9.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members
StateIsNotFinalException Struct Reference

State is not final (and cannot have a final weight). More...

#include <HfstExceptionDefs.h>

Inheritance diagram for StateIsNotFinalException:

Additional Inherited Members

- Public Member Functions inherited from HfstException
HFSTDLL std::string operator() (void) const
 Get the error message. More...

Detailed Description

State is not final (and cannot have a final weight).

An example:

HfstBasicTransducer tr;
// An exception is thrown as state number 1 is not final
float w = tr.get_final_weight(1);

You should use function is_final_state if you are not sure whether a state is final.

Thrown by hfst::implementations::HfstTransitionGraph::get_final_weight.  

The documentation for this struct was generated from the following file: