Home | History | Annotate | Download | only in lib

Lines Matching refs:arc

36 class VectorFstBaseImpl : public FstImpl<typename State::Arc> {
38 typedef typename State::Arc Arc;
39 typedef typename Arc::Weight Weight;
40 typedef typename Arc::StateId StateId;
71 void AddArc(StateId s, const Arc &arc) {
72 states_[s]->arcs.push_back(arc);
92 vector<Arc> &arcs = states_[s]->arcs;
138 void InitStateIterator(StateIteratorData<Arc> *data) const {
143 // Provide information needed for generic arc iterator
144 void InitArcIterator(StateId s, ArcIteratorData<Arc> *data) const {
161 typedef A Arc;
232 void AddArc(StateId s, const A &arc) {
234 if (arc.ilabel != arc.olabel) {
238 if (arc.ilabel == 0) {
242 if (arc.olabel == 0) {
247 if (arc.olabel == 0) {
254 if (parc.ilabel > arc.ilabel) {
258 if (parc.olabel > arc.olabel) {
263 if (arc.weight != Weight::Zero() && arc.weight != Weight::One()) {
267 if (arc.nextstate <= s) {
277 BaseImpl::AddArc(s, arc);
339 const A &arc = aiter.Value();
340 BaseImpl::AddArc(s, arc);
341 if (arc.ilabel == 0)
343 if (arc.olabel == 0)
371 A arc;
372 ReadType(strm, &arc.ilabel);
373 ReadType(strm, &arc.olabel);
374 arc.weight.Read(strm);
375 ReadType(strm, &arc.nextstate);
380 impl->BaseImpl::AddArc(s, arc);
381 if (arc.ilabel == 0)
383 if (arc.olabel == 0)
435 const A &arc = state->arcs[a];
436 WriteType(strm, arc.ilabel);
437 WriteType(strm, arc.olabel);
438 arc.weight.Write(strm);
439 WriteType(strm, arc.nextstate);
459 typedef A Arc;
593 virtual void AddArc(StateId s, const A &arc) {
595 impl_->AddArc(s, arc);
743 virtual void SetValue(const A &arc) {
759 oarc = arc;
760 if (arc.ilabel != arc.olabel)
762 if (arc.ilabel == 0) {
765 if (arc.olabel == 0)
768 if (arc.olabel == 0) {
772 if (arc.weight != Weight::Zero() && arc.weight != Weight::One())
786 // Provide information needed for the generic mutable arc iterator