-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor taylor expansion #155
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## computgraph #155 +/- ##
===============================================
+ Coverage 63.75% 68.07% +4.31%
===============================================
Files 64 64
Lines 4442 4501 +59
===============================================
+ Hits 2832 3064 +232
+ Misses 1610 1437 -173
☔ View full report in Codecov by Sentry. |
function eval!(g::FeynmanGraph{F,W}, leafmap::Dict{Int,Int}=Dict{Int,Int}(), leaf::Vector{W}=Vector{W}()) where {F,W} | ||
result = nothing | ||
|
||
for node in PostOrderDFS(g) | ||
if isleaf(node) | ||
node.weight = leaf[leafmap[node.id]] | ||
if isempty(leafmap) | ||
node.weight = 1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why set empty leaf as 1.0?
1.Refactor taylor exapansion api. Add support to taylor expansion of FeynmanGraph and DiagTree (no need to convert them to Graph first).
2. Default variable dependence of taylor expansion is changed. If dependence is not provided for some nodes, they are assumed to depend on no variables (meaning that their expansion only has order zero term)
3. Benchmark taylor expansion with sigmaGV FeynmanGraphs.
TODO: