-
Notifications
You must be signed in to change notification settings - Fork 0
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
Mc tools #29
Conversation
Codecov Report
@@ Coverage Diff @@
## master #29 +/- ##
==========================================
+ Coverage 45.50% 46.08% +0.58%
==========================================
Files 9 9
Lines 1191 1202 +11
==========================================
+ Hits 542 554 +12
+ Misses 649 648 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
src/grid/interpolate.jl
Outdated
return abs(x-grid[i])<abs(x-grid[i+1]) ? i : (i+1) | ||
end | ||
|
||
function volumn(grid::AbstractGrid, i) |
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.
volumn -> volume ?
i = floor(grid, x) | ||
return abs(x-grid[i])<abs(x-grid[i+1]) ? i : (i+1) | ||
end | ||
|
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.
documentation. Something like:
returns the span of the grid point. If the grid points are ...x_{i-1}, x_i, x_{i+1},..., then the volume of x_i is defined as (x_{i+1}-x_{i-1})/2. The volume of the grid points on the boundary is halved.
@@ -864,4 +864,23 @@ function differentiate1D(::CompositeDifferentiate, data, xgrid, x) | |||
return differentiate1D(view(data, head:tail), xgrid.subgrids[i], x) | |||
end | |||
|
|||
# locate and volumn for monte carlo | |||
|
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.
documentation
added locate and volumn for monte carlo simulation