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

Method init

src/TopicModel/LDA.h:51–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 ShareableMatrix& operator=(ShareableMatrix&& o) = default;
50
51 void init(_Scalar* ptr, Eigen::Index rows, Eigen::Index cols)
52 {
53 if (!ptr && rows && cols)
54 {
55 ownData = Eigen::Matrix<_Scalar, _rows, _cols>::Zero(_rows != -1 ? _rows : rows, _cols != -1 ? _cols : cols);
56 ptr = ownData.data();
57 }
58 else
59 {
60 ownData = Eigen::Matrix<_Scalar, _rows, _cols>{};
61 }
62 new (this) BaseType(ptr, _rows != -1 ? _rows : rows, _cols != -1 ? _cols : cols);
63 }
64
65 void conservativeResize(size_t newRows, size_t newCols)
66 {

Callers 15

prepareDocMethod · 0.45
initGlobalStateMethod · 0.45
updateForCopyMethod · 0.45
initGlobalStateMethod · 0.45
prepareDocMethod · 0.45
updateMethod · 0.45
distributePartitionMethod · 0.45
prepareDocMethod · 0.45
initGlobalStateMethod · 0.45
updateMethod · 0.45
initGlobalStateMethod · 0.45
initGlobalStateMethod · 0.45

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected