Skip to content
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

Merged
merged 4 commits into from
Oct 30, 2023
Merged

Tao ad #151

merged 4 commits into from
Oct 30, 2023

Conversation

fsxbhyy
Copy link
Collaborator

@fsxbhyy fsxbhyy commented Oct 28, 2023

  1. Add order truncation for each variable.
  2. Change taylor expansion api to make it more user friendly.

@fsxbhyy fsxbhyy added the enhancement New feature or request label Oct 28, 2023
@fsxbhyy fsxbhyy self-assigned this Oct 28, 2023
@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (12f821d) 63.83% compared to head (94b8cea) 63.87%.

❗ 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     
Files Coverage Δ
src/TaylorSeries/TaylorSeries.jl 100.00% <ø> (ø)
src/TaylorSeries/constructors.jl 87.50% <100.00%> (ø)
src/TaylorSeries/print.jl 40.62% <ø> (ø)
src/TaylorSeries/arithmetic.jl 67.88% <60.00%> (ø)
src/utility.jl 85.29% <95.65%> (-0.43%) ⬇️
src/TaylorSeries/parameter.jl 66.66% <73.68%> (+4.16%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.
Copy link
Collaborator

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.
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*coefficients

@@ -14,7 +14,7 @@
These parameters can be changed using [`set_variables`](@ref)
"""
mutable struct ParamsTaylor
order::Int
order::Vector{Int}
Copy link
Collaborator

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.

@fsxbhyy fsxbhyy merged commit a7e6573 into computgraph Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants