MCPcopy Create free account
hub / github.com/bab2min/tomotopy / findUid

Method findUid

src/python/handler/py_utils.cpp:137–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135};
136
137size_t CorpusObject::findUid(const std::string& uid) const
138{
139 if (isIndependent() || isSubDocs())
140 {
141 auto it = invmap.find(uid);
142 if (it == invmap.end()) return -1;
143 return it->second;
144 }
145 else
146 {
147 return tm->inst->getDocIdByUid(uid);
148 }
149}
150
151const tomoto::RawDocKernel* CorpusObject::getDoc(size_t idx) const
152{

Callers

nothing calls this directly

Calls 2

getDocIdByUidMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected