#include <ensemble.hpp>
Public Member Functions | |
template<value_type::weight_value_type WV> | |
double | operator() (const canonical< vertex_weight< WV >, R > &ensemble) |
overloaded ratio specialization for canonical ensembles and vertex weights | |
template<value_type::weight_value_type WV> | |
double | operator() (const canonical< link_weight< WV >, R > &ensemble) |
overloaded ratio specialization for canonical ensembles and link weights | |
template<value_type::weight_value_type WV> | |
double | operator() (const grandcanonical< vertex_weight< WV >, R > &ensemble) |
overloaded ratio specialization for grand-canonical ensembles and vertex weights | |
template<value_type::weight_value_type WV> | |
double | operator() (const grandcanonical< link_weight< WV >, R > &ensemble) |
overloaded ratio specialization for grand-canonical ensembles and link weights | |
template<value_type::weight_value_type WV> | |
double | operator() (const microcanonical< vertex_weight< WV >, R > &) |
overloaded ratio specialization for micro-canonical ensembles and vertex weights. | |
template<value_type::weight_value_type WV> | |
double | operator() (const microcanonical< link_weight< WV >, R > &ensemble) |
overloaded ratio specialization for micro-canonical ensembles and link weights |
According to the ensemble the functor is selected from, W(beta)/W(alpha) is calculated, alpha being the pre- and beta the post-update graph configuration.
In order to calculate weight ratios in any situation, there must be an overloaded version of operator() for any reasonable combination of ensemble and weight type. Exploiting this, for example, calculation using logarithmic weights types is possible.
This functor implements the generic weight ratio function, taking only moderately into account the specific restricted graph ensemble. Specialize the template for any shape restriction functor to specifically exploit the properties of restricted ensemble.
R | shape restriction functor class. Generic calculation may not use this |
double graphgen::Ratio< R >::operator() | ( | const grandcanonical< link_weight< WV >, R > & | ensemble | ) | [inline] |
overloaded ratio specialization for grand-canonical ensembles and link weights
References graphgen::undirected_graph::degree(), and graphgen::undirected_graph::no_of_links().
double graphgen::Ratio< R >::operator() | ( | const microcanonical< vertex_weight< WV >, R > & | ) | [inline] |
overloaded ratio specialization for micro-canonical ensembles and vertex weights.
The ensemble parameter is not used, and only for interface compatibility.