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

Method getCountVector

src/python/handler/py_LDA.cpp:621–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

619}
620
621std::vector<float> DocumentObject::getCountVector() const
622{
623 if (corpus->isIndependent()) throw py::AttributeError{ "This method can only be called by documents bound to the topic model." };
624 if (!corpus->tm->inst) throw runtime_error{ "inst is null" };
625 size_t v = corpus->tm->inst->getV();
626
627 return docVisit<tomoto::DocumentLDA>(getBoundDoc(), [&](auto* doc)
628 {
629 return doc->getCountVector(v);
630 });
631
632 throw py::AttributeError{ "cannot get count vector" };
633}

Callers

nothing calls this directly

Calls 2

isIndependentMethod · 0.80
getVMethod · 0.80

Tested by

no test coverage detected