Skip to content

Commit 7924be1

Browse files
committed
don't forget Bernoulli prior
1 parent a79f2be commit 7924be1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/common_helpers.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ inline UpdateMethod update_method_from_string(const std::string& update_method)
4141
throw std::invalid_argument("Invalid update_method: " + update_method);
4242
}
4343

44-
enum EdgePrior { Stochastic_Block, Beta_Bernoulli };
44+
enum EdgePrior { Stochastic_Block, Beta_Bernoulli, Bernoulli };
4545

4646
inline EdgePrior edge_prior_from_string(const std::string& edge_prior) {
4747
if (edge_prior == "stochastic-block")
@@ -50,5 +50,8 @@ inline EdgePrior edge_prior_from_string(const std::string& edge_prior) {
5050
if (edge_prior == "Beta-Bernoulli")
5151
return Beta_Bernoulli;
5252

53+
if (edge_prior == "Bernoulli")
54+
return Bernoulli;
55+
5356
throw std::invalid_argument("Invalid edge_prior: " + edge_prior);
5457
}

0 commit comments

Comments
 (0)