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

Method updateWeakArray

src/TopicModel/TopicModel.hpp:482–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480 }
481
482 void updateWeakArray()
483 {
484 wOffsetByDoc.emplace_back(0);
485 for (auto& doc : docs)
486 {
487 wOffsetByDoc.emplace_back(wOffsetByDoc.back() + doc.words.size());
488 }
489 auto tx = [](_DocType& doc) { return &doc.words; };
490 tvector<Vid>::trade(words,
491 makeTransformIter(docs.begin(), tx),
492 makeTransformIter(docs.end(), tx)
493 );
494 }
495
496 void updateForCopy()
497 {

Callers 2

prepareMethod · 0.80
prepareMethod · 0.80

Calls 6

makeTransformIterFunction · 0.85
emplace_backMethod · 0.80
backMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected