MCPcopy Create free account
hub / github.com/Tencent/embedx / Unique

Function Unique

src/model/instance_reader/eges_inst_reader.cc:28–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace {
27
28void Unique(const vec_int_t& nodes, vec_int_t* unique_nodes) {
29 unique_nodes->clear();
30 for (auto& node : nodes) {
31 // O(n) !!!
32 auto it = std::find(unique_nodes->begin(), unique_nodes->end(), node);
33 if (it == unique_nodes->end()) {
34 unique_nodes->emplace_back(node);
35 }
36 }
37}
38
39} // namespace
40

Callers 1

GetTrainBatchMethod · 0.85

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected