src/mixings/dirichlet_mixing.cc
//! \param n_clust Number of clusters
//! \param n       Total number of data points
//! \return        Probability value
\param n_clust Number of clusters
\param n       Total number of data points
\return        Probability value
\ param n_clust Number of clusters \ param n Total number of data points \ return Probability value
double DirichletMixing::mass_new_cluster(const unsigned int n_clust,
                                         const unsigned int n, bool log,
                                         bool propto) const {
  double out;
  if (log) {
    out = state.logtotmass;
    if (!propto) out -= std::log(n + state.totalmass);
  } else {
    out = state.totalmass;
    if (!propto) out /= (n + state.totalmass);
  }
  return out;
}
double DirichletMixing :: mass_new_cluster ( const unsigned int n_clust , const unsigned int n , bool log , bool propto ) const { double out ; if ( log ) { out = state . logtotmass ; if ( ! propto ) out -= std :: log ( n + state . totalmass ) ; } else { out = state . totalmass ; if ( ! propto ) out /= ( n + state . totalmass ) ; } return out ; }
\param n_clust Number of clusters
\param n       Total number of data points
\return        Probability value
\ param n_clust Number of clusters \ param n Total number of data points \ return Probability value