Home | History | Annotate | Download | only in lib

Lines Matching defs:partition

33 #include "fst/lib/partition.h"
40 // comparator for creating partition based on sorting on
59 const Partition<typename A::StateId>& partition,
61 : fst_(fst), partition_(partition), flags_(flags) {}
100 const Partition<typename A::StateId>& partition_;
133 const Partition<StateId>& partition() const {
142 ArcIterCompare(const Partition<StateId>& partition)
143 : partition_(partition) {}
149 // (partition class Ids)
157 const Partition<StateId>& partition_;
195 VLOG(5) << "Initial Partition: " << P_.num_classes();
200 // in the partition corresponding to final, non-final
210 // prep partition
218 // partition all classes with destination C
275 Partition<StateId> P_;
277 // L = set of active classes to be processed in partition P
310 const Partition<StateId>& partition() {
384 // create initial partition based on height
414 // create refined partition
431 Partition<StateId> partition_;
435 // Given a partition and a mutable fst, merge states of Fst inplace
437 // a class of the partition to be the representative state for the class.
442 const Partition<typename A::StateId>& partition, MutableFst<A>* fst) {
445 vector<StateId> state_map(partition.num_classes());
446 for (size_t i = 0; i < (size_t)partition.num_classes(); ++i) {
447 PartitionIterator<StateId> siter(partition, i);
448 state_map[i] = siter.Value(); // first state in partition;
452 for (size_t c = 0; c < (size_t)partition.num_classes(); ++c) {
453 for (PartitionIterator<StateId> siter(partition, c);
459 arc.nextstate = state_map[partition.class_id(arc.nextstate)];
468 fst->SetStart(state_map[partition.class_id(fst->Start())]);
487 MergeStates(minimizer.partition(), fst);
493 MergeStates(minimizer.partition(), fst);