angeloskath / supervised-lda

A flexible variational inference LDA library.
MIT License
22 stars 5 forks source link

Create a templated model_parameters to cast the returned pointer #16

Closed angeloskath closed 8 years ago

angeloskath commented 8 years ago

For instance the following

template <typename P>
std::shared_ptr<const P> model_parameters() {
    return std::static_pointer_cast<const P>(parameters here);
}

Also consider returning a pointer to ModelParameters instead of Parameters.