vendor/tomotopy/src/TopicModel/DMRModel.hpp in tomoto-0.2.2 vs vendor/tomotopy/src/TopicModel/DMRModel.hpp in tomoto-0.2.3
- old
+ new
@@ -45,11 +45,14 @@
using BaseClass = LDAModel<_tw, _RandGen, _Flags, _Interface, DerivedClass, _DocType, _ModelState>;
friend BaseClass;
friend typename BaseClass::BaseClass;
using WeightType = typename BaseClass::WeightType;
- static constexpr char TMID[] = "DMR\0";
+ static constexpr auto tmid()
+ {
+ return serializer::to_key("DMR\0");
+ }
Matrix lambda;
mutable std::unordered_map<std::pair<uint64_t, Vector>, size_t, MdHash> mdHashMap;
mutable Matrix cachedAlphas;
Float sigma;
@@ -447,10 +450,10 @@
void setOptimRepeat(size_t _optimRepeat) override
{
optimRepeat = _optimRepeat;
}
- std::vector<Float> getTopicsByDoc(const _DocType& doc, bool normalize) const
+ std::vector<Float> _getTopicsByDoc(const _DocType& doc, bool normalize) const
{
std::vector<Float> ret(this->K);
auto alphaDoc = getCachedAlpha(doc);
Eigen::Map<Eigen::Array<Float, -1, 1>> m{ ret.data(), this->K };
if (normalize)