src/mixings/dirichlet_mixing.cc
//! \param card Cardinality of the cluster
//! \param n    Total number of data points
//! \return     Probability value
\param card Cardinality of the cluster
\param n    Total number of data points
\return     Probability value
\ param card Cardinality of the cluster \ param n Total number of data points \ return Probability value
double DirichletMixing::mass_existing_cluster(
    std::shared_ptr<BaseHierarchy> hier, const unsigned int n, bool log,
    bool propto) const {
  double out;
  if (log) {
    out = hier->get_log_card();
    if (!propto) out -= std::log(n + state.totalmass);
  } else {
    out = 1.0 * hier->get_card();
    if (!propto) out /= (n + state.totalmass);
  }
  return out;
}
double DirichletMixing :: mass_existing_cluster ( std :: shared_ptr < BaseHierarchy > hier , const unsigned int n , bool log , bool propto ) const { double out ; if ( log ) { out = hier -> get_log_card ( ) ; if ( ! propto ) out -= std :: log ( n + state . totalmass ) ; } else { out = 1.0 * hier -> get_card ( ) ; if ( ! propto ) out /= ( n + state . totalmass ) ; } return out ; }
\param card Cardinality of the cluster
\param n    Total number of data points
\return     Probability value
\ param card Cardinality of the cluster \ param n Total number of data points \ return Probability value