20#include "reaction_methods/SingleReaction.hpp"
25#include <unordered_map>
33 for (
int i = 1; i <= nu_i; i++) {
34 value *=
static_cast<double>(Ni0 + i);
38 for (
int i = 0; i < -nu_i; i++) {
39 value *=
static_cast<double>(Ni0 - i);
48 std::unordered_map<int, int>
const &particle_numbers) {
59 auto const N_i0 = particle_numbers.at(reaction.
product_types[i]);
67 std::unordered_map<int, int>
const &particle_numbers) {
78 auto const N_i0 = particle_numbers.at(reaction.
product_types[0]);
double calculate_factorial_expression(SingleReaction const &reaction, std::unordered_map< int, int > const &particle_numbers)
Calculates the whole product of factorial expressions which occur in the reaction ensemble acceptance...
double factorial_Ni0_divided_by_factorial_Ni0_plus_nu_i(int Ni0, int nu_i)
Calculates the factorial expression which occurs in the reaction ensemble acceptance probability.
double calculate_factorial_expression_cpH(SingleReaction const &reaction, std::unordered_map< int, int > const &particle_numbers)
Calculates the factorial expression which occurs in the constant pH method with symmetric proposal pr...
std::vector< int > reactant_types
std::vector< int > product_types
std::vector< int > product_coefficients
std::vector< int > reactant_coefficients