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

Method getPath

src/python/handler/py_HLDA.cpp:62–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62std::vector<int32_t> DocumentObject::getPath() const
63{
64 if (corpus->isIndependent()) throw py::AttributeError{ "doc has no `path` field!" };
65 if (!doc) throw py::RuntimeError{ "doc is null!" };
66 if (auto ret = docVisit<tomoto::DocumentHLDA>(getBoundDoc(), [](auto* doc) -> std::optional<std::vector<int32_t>>
67 {
68 return doc->path;
69 })) return *ret;
70 throw py::AttributeError{ "doc has no `path` field!" };
71}

Callers

nothing calls this directly

Calls 1

isIndependentMethod · 0.80

Tested by

no test coverage detected