-
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
Tao ad #151
Tao ad #151
Conversation
fsxbhyy
commented
Oct 28, 2023
- Add order truncation for each variable.
- Change taylor expansion api to make it more user friendly.
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## computgraph #151 +/- ##
===============================================
+ Coverage 63.83% 63.87% +0.03%
===============================================
Files 63 63
Lines 4397 4404 +7
===============================================
+ Hits 2807 2813 +6
- Misses 1590 1591 +1
☔ View full report in Codecov by Sentry. |
src/utility.jl
Outdated
- `graph` Target graph. Must be a leaf. | ||
- `var` The variables graph depends on. | ||
- `graph` Target graph. | ||
- `var_dependence` The variables graph leaves depend on. |
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.
Make this docstring more descriptive. For example, add "Should map each leaf ID of g
to a Vector{Bool}
indicating the taylor variables it depends on. By default, assumes all leaves depend on all variables."
src/utility.jl
Outdated
end | ||
|
||
""" | ||
graph_to_taylor_withmap!(g::G; coeffmode=true, var::Array{Int,1}=collect(1:get_numvars())) where {G<:Graph} | ||
taylorexpansion_withmap(g::G; coeffmode=true, var::Vector{Int}=collect(1:get_numvars())) where {G<:Graph} | ||
|
||
Return a taylor series of graph g, together with a map of chain relation ship between generated derivatives. |
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.
*relationships
src/utility.jl
Outdated
@@ -43,16 +64,16 @@ end | |||
- `coeffmode` If true, the generated taylor series saves taylor coefficietnts with the factorial prefactor. If false, the taylor series saves derivatives instead |
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.
*coefficients
src/TaylorSeries/parameter.jl
Outdated
@@ -14,7 +14,7 @@ | |||
These parameters can be changed using [`set_variables`](@ref) | |||
""" | |||
mutable struct ParamsTaylor | |||
order::Int | |||
order::Vector{Int} |
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.
I would prefer to pluralize this name order
-> orders
, since the field now represents a list of maximum expansion orders. Similarly, pluralize get_order
-> get_orders
.