Calculating the weight of a diagram only need to know the internal variables and the G and interaction functions. It does not rely on how G and interaction are topologically connected. Such observation can be used to make the code as generic as possible.
The following may be useful in the future:
- Each group in the diagram file should provide a list of independent variables, with external and internal variables separately marked. There is no need to provide diagram topology in principle.
- In the code, each group object maintains the same list of independent variables, and a list of related G and interactions.
- MC updates simply use these variables to calculate the weight of G and interaction.
Calculating the weight of a diagram only need to know the internal variables and the G and interaction functions. It does not rely on how G and interaction are topologically connected. Such observation can be used to make the code as generic as possible.
The following may be useful in the future: