graphgen::Ratio< R > Class Template Reference
[ensemble specific update routines and rate calculation]

Ratio functor calculates the appropriate weight ratio for a proposed local update. More...

#include <ensemble.hpp>

List of all members.

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


Detailed Description

template<template< class W >class R>
class graphgen::Ratio< R >

Ratio functor calculates the appropriate weight ratio for a proposed local update.

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.

Parameters:
R shape restriction functor class. Generic calculation may not use this

Member Function Documentation

template<template< class W >class R>
template<value_type::weight_value_type WV>
double graphgen::Ratio< R >::operator() ( const grandcanonical< link_weight< WV >, R > &  ensemble  )  [inline]

overloaded ratio specialization for grand-canonical ensembles and link weights

Todo:

References graphgen::undirected_graph::degree(), and graphgen::undirected_graph::no_of_links().

template<template< class W >class R>
template<value_type::weight_value_type WV>
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.


The documentation for this class was generated from the following file:

Generated on Wed Jun 2 14:49:09 2010 for GraphGen by  doxygen 1.5.6