blob: e3ae6ebf736ebe3f20a9778c382177f5fad6c8eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "search/edge_queue.hh"
#include "lm/left.hh"
#include "search/context.hh"
#include <stdint.h>
namespace search {
EdgeQueue::EdgeQueue(unsigned int pop_limit_hint) : partial_edge_pool_(sizeof(PartialEdge), pop_limit_hint * 2) {
take_ = static_cast<PartialEdge*>(partial_edge_pool_.malloc());
}
/*void EdgeQueue::AddEdge(PartialEdge &root, unsigned char arity, Note note) {
// Ignore empty edges.
for (unsigned char i = 0; i < edge.Arity(); ++i) {
PartialVertex root(edge.GetVertex(i).RootPartial());
if (root.Empty()) return;
total_score += root.Bound();
}
PartialEdge &allocated = *static_cast<PartialEdge*>(partial_edge_pool_.malloc());
allocated.score = total_score;
}*/
} // namespace search
|