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

Method getLambdaV2

src/python/handler/py_DMR.cpp:178–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178py::UniqueObj DMRModelObject::getLambdaV2() const
179{
180 auto* inst = getInst<tomoto::IDMRModel>();
181 float* ptr;
182 size_t fs = inst->getF() * inst->getMdVecSize();
183 auto ret = py::newEmptyArray(ptr, inst->getK(), inst->getF(), inst->getMdVecSize());
184 for (size_t i = 0; i < inst->getK(); ++i)
185 {
186 auto l = inst->getLambdaByTopic(i);
187 memcpy(ptr + i * fs, l.data(), sizeof(float) * fs);
188 }
189 return ret;
190}
191
192py::UniqueObj DMRModelObject::getAlpha() const
193{

Callers

nothing calls this directly

Calls 4

newEmptyArrayFunction · 0.85
getLambdaByTopicMethod · 0.80
getKMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected