HomeSort by relevance Sort by last modified time
    Searched refs:Weight (Results 1 - 25 of 48) sorted by null

1 2

  /external/srec/tools/thirdparty/OpenFst/fst/lib/
random-weight.h 1 // random-weight.h
26 #include "fst/lib/float-weight.h"
27 #include "fst/lib/product-weight.h"
28 #include "fst/lib/string-weight.h"
33 // divisors should be returned in the random weight generation.
39 typedef TropicalWeight Weight;
46 Weight operator() () const {
49 return Weight::Zero();
51 return Weight(static_cast<float>(n));
66 typedef LogWeight Weight;
    [all...]
prune.h 31 typedef typename A::Weight Weight;
34 Weight threshold;
39 vector<Weight> *idistance;
42 vector<Weight> *fdistance;
44 PruneOptions(const Weight& t, ArcFilter f, vector<Weight> *id = 0,
45 vector<Weight> *fd = 0)
52 // do not belong to a successful path whose weight is no more than
53 // 'opts.threshold' Times() the weight of the shortest path. Weight
102 Weight weight = Times(Times((*idistance)[state], arc.weight), local
210 Weight weight = Times(Times((*idistance)[state], arc.weight), local
    [all...]
reweight.h 30 // vector in the direction defined by TYPE. Weight needs to be left
34 // An arc of weight w, with an origin state of potential p and
39 void Reweight(MutableFst<Arc> *fst, vector<typename Arc::Weight> potential,
41 typedef typename Arc::Weight Weight;
46 potential.push_back(Weight::Zero());
48 if (type == REWEIGHT_TO_FINAL && !(Weight::Properties() & kRightSemiring))
50 << "Weight to be right distributive: "
51 << Weight::Type();
53 if (type == REWEIGHT_TO_INITIAL && !(Weight::Properties() & kLeftSemiring)
    [all...]
shortest-distance.h 58 typedef typename Arc::Weight Weight;
62 vector<Weight> *distance,
79 vector<Weight> *distance_;
85 vector<Weight> rdistance_; // Relaxation distance.
99 if (!(Weight::Properties() & kRightSemiring))
100 LOG(FATAL) << "ShortestDistance: Weight needs to be right distributive: "
101 << Weight::Type();
115 distance_->push_back(Weight::Zero());
116 rdistance_.push_back(Weight::Zero())
    [all...]
arc.h 22 #include "fst/lib/float-weight.h"
23 #include "fst/lib/product-weight.h"
24 #include "fst/lib/string-weight.h"
32 typedef TropicalWeight Weight;
35 StdArc(Label i, Label o, Weight w, StateId s)
36 : ilabel(i), olabel(o), weight(w), nextstate(s) {}
47 Weight weight; // Transition weight member in struct:fst::StdArc
56 typedef LogWeight Weight;
71 Weight weight; \/\/ Transition weight member in struct:fst::LogArc
100 Weight weight; \/\/ Transition weight member in class:fst::StringArc
134 Weight weight; \/\/ Transition weight member in struct:fst::GallicArc
159 Weight weight; \/\/ Transition weight member in struct:fst::ReverseArc
    [all...]
shortest-path.h 55 // The shortest path is the lowest weight path w.r.t. the natural
63 vector<typename Arc::Weight> *distance,
66 typedef typename Arc::Weight Weight;
75 vector<Weight> rdistance;
82 Weight f_distance = Weight::Zero();
90 if ((Weight::Properties() & (kPath | kRightSemiring))
92 LOG(FATAL) << "SingleShortestPath: Weight needs to have the path"
93 << " property and be right distributive: " << Weight::Type()
    [all...]
determinize.h 32 #include "fst/lib/factor-weight.h"
49 typedef W Weight;
62 typedef StringWeight<L, S> Weight;
64 Weight operator()(const Weight &w1, const Weight &w2) const {
69 LOG(FATAL) << "LabelCommonDivisor: Weight needs to be left semiring";
72 return Weight::One();
73 else if (w1 == Weight::Zero())
74 return Weight(iter2.Value())
219 Weight weight; \/\/ Residual weight member in struct:fst::DeterminizeFsaImpl::Element
    [all...]
randgen.h 34 // transition is selected. If N == NumArcs(), then the final weight at
44 typedef typename A::Weight Weight;
51 if (fst.Final(s) != Weight::Zero())
58 // log probabilities after normalizing for the total weight leaving
59 // the state). Weight::zero transitions are disregarded.
60 // Assumes Weight::Value() accesses the floating point
61 // representation of the weight.
65 typedef typename A::Weight Weight;
    [all...]
rational.h 53 typedef typename A::Weight Weight;
71 rfst_.SetFinal(1, Weight::One());
75 rfst_.AddArc(0, A(0, -1, Weight::One(), 1));
76 rfst_.AddArc(0, A(0, -2, Weight::One(), 1));
94 rfst_.SetFinal(2, Weight::One());
98 rfst_.AddArc(0, A(0, -1, Weight::One(), 1));
99 rfst_.AddArc(1, A(0, -2, Weight::One(), 2));
115 rfst_.SetFinal(0, Weight::One());
116 rfst_.AddArc(0, A(0, -1, Weight::One(), 0))
    [all...]
reverse.h 27 // MutableFst. If A transduces string x to y with weight a, then the
29 // weight a.Reverse().
34 // the input arc type except having the reversed Weight type.
38 typedef typename Arc::Weight Weight;
39 typedef typename RevArc::Weight RevWeight;
58 Weight final = ifst.Final(is);
59 if (final != Weight::Zero()) {
68 RevArc oarc(iarc.ilabel, iarc.olabel, iarc.weight.Reverse(), os);
closure.h 28 // MutableFst input. If FST transduces string x to y with weight a,
29 // then the closure transduces x to y with weight a, xx to yy with
30 // weight Times(a, a), xxx to yyy with with Times(Times(a, a), a),
32 // transduced to itself with weight Weight::One() as well.
42 typedef typename Arc::Weight Weight;
50 Weight final = fst->Final(s);
51 if (final != Weight::Zero())
57 fst->SetFinal(nstart, Weight::One())
    [all...]
factor-weight.h 1 // factor-weight.h
50 // A factor iterator takes as argument a weight w and returns a
149 typedef typename A::Weight Weight;
156 Element(StateId s, Weight w) : state(s), weight(w) {}
159 Weight weight; // Residual weight member in struct:fst::FactorWeightFstImpl::Element
165 SetType("factor-weight");
    [all...]
rmfinalepsilon.h 33 typedef typename A::Weight Weight;
48 if (fst->Final(s) != Weight::Zero()) {
63 // Move the final weight. Complexity O(E)
67 Weight w(fst->Final(s));
76 w = Plus(Times(fst->Final(arc.nextstate), arc.weight), w);
statesort.h 36 typedef typename Arc::Weight Weight;
57 Weight final1 = fst->Final(s1), final2 = Weight::Zero();
complement.h 54 typedef typename A::Weight Weight;
76 Weight Final(StateId s) const {
77 if (s == 0 || fst_->Final(s - 1) == Weight::Zero())
78 return Weight::One();
80 return Weight::Zero();
115 typedef typename A::Weight Weight;
134 virtual Weight Final(StateId s) const { return impl_->Final(s); }
219 typedef typename A::Weight Weight
    [all...]
map.h 31 // A final weight is mapped into a final weight. An error
35 // A final weight is mapped to an arc to the superfinal state
36 // when the result cannot be represented as a final weight.
40 // A final weight is mapped to an arc to the superfinal state
41 // unless the result can be represented as a final weight of weight
56 // // form A(0, 0, weight, kNoStateId).
83 typedef typename A::Weight Weight;
    [all...]
concat.h 31 // with weight a and FST2 transduces string w to v with weight b, then
42 typedef typename Arc::Weight Weight;
70 Weight final = fst1->Final(s1);
71 if (final != Weight::Zero()) {
72 fst1->SetFinal(s1, Weight::Zero());
94 // delayed Fst. If FST1 transduces string x to y with weight a and FST2
95 // transduces string w to v with weight b, then their concatenation
110 typedef typename A::Weight Weight
    [all...]
union.h 29 // weight a and B transduces string w to v with weight b, then their
30 // union transduces x to y with weight a and w to v with weight b.
40 typedef typename Arc::Weight Weight;
73 fst1->AddArc(start1, Arc(0, 0, Weight::One(), start2 + numstates1));
77 fst1->AddArc(nstart1, Arc(0, 0, Weight::One(), start1));
78 fst1->AddArc(nstart1, Arc(0, 0, Weight::One(), start2 + numstates1));
96 // Fst. If A transduces string x to y with weight a and B transduce
    [all...]
push.h 23 #include "fst/lib/factor-weight.h"
32 // pushing towards the initial state, the sum of the weight of the
33 // outgoing transitions and final weight at a non-initial state is
37 // Weight needs to be left distributive when pushing towards the
42 vector<typename Arc::Weight> distance;
52 // to PTYPE in the direction defined by RTYPE. Weight needs to be
66 vector<typename GallicArc<Arc, stype>::Weight> gdistance;
80 typename Arc::Weight, stype> > fwfst(gfst);
equal.h 30 typedef typename Arc::Weight Weight;
53 Weight final1 = fst1.Final(s1);
54 Weight final2 = fst2.Final(s2);
86 } else if (!ApproxEqual(arc1.weight, arc2.weight)) {
90 << ", weight1 = " << arc1.weight
91 << ", weight2 = " << arc2.weight;
queue.h 47 // // Updates ordering of state s when weight changes, if necessary
247 typedef typename L::Weight Weight;
250 StateWeightCompare(const vector<Weight>* weights, const L &less)
258 const vector<Weight>* weights_;
263 // Shortest-first queue discipline, templated on the StateId and Weight is
264 // specialized to use the weight's natural order for the comparion function.
502 // the Weight type has the path property, will entertain the
505 AutoQueue(const Fst<Arc> &fst, const vector<typename Arc::Weight> *distance,
507 typedef typename Arc::Weight Weight
    [all...]
  /frameworks/base/core/tests/coretests/src/android/widget/layout/linear/
WeightTest.java 26 import android.widget.layout.linear.Weight;
28 public class WeightTest extends ActivityInstrumentationTestCase<Weight> {
33 super("com.android.frameworks.coretests", Weight.class);
Weight.java 24 public class Weight extends Activity {
  /frameworks/base/core/tests/coretests/src/android/widget/layout/table/
Weight.java 25 * Exercise table layout with cells having a weight.
27 public class Weight extends Activity {
WeightTest.java 19 import android.widget.layout.table.Weight;
27 * {@link android.widget.layout.table.Weight} is
28 * setup to exercise tables in which cells use a weight.
30 public class WeightTest extends ActivityInstrumentationTestCase<Weight> {
37 super("com.android.frameworks.coretests", Weight.class);
44 final Weight activity = getActivity();

Completed in 338 milliseconds

1 2