-
Notifications
You must be signed in to change notification settings - Fork 1
Interface for Multivariate processes #92
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
base: main
Are you sure you want to change the base?
Changes from all commits
e98f3e6
7f45b10
28c32f6
c2d4ba1
af47ed7
4052588
5d08bc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,3 +39,19 @@ end | |
| function integrated_ground_intensity(bpp::BoundedPointProcess, args...) | ||
| return integrated_ground_intensity(bpp.pp, args...) | ||
| end | ||
|
|
||
| function DensityInterface.logdensityof(bpp::BoundedPointProcess, h) | ||
| if min_time(h) < min_time(bpp) || max_time(h) > max_time(bpp) | ||
| throw(ArgumentError("History is defined outside the bounds of the process")) | ||
| end | ||
| return logdensityof(bpp.pp, h) | ||
| end | ||
|
|
||
| function time_change(h::History{T}, pp::BoundedPointProcess) where {T} | ||
| if min_time(h) < min_time(pp) || max_time(h) > max_time(pp) | ||
| throw(ArgumentError("History is defined outside the bounds of the process")) | ||
| end | ||
| return time_change(h, pp.pp) | ||
| end | ||
|
|
||
| simulate(pp::BoundedPointProcess) = simulate(pp.pp, pp.tmin, pp.tmax) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. new fallabck covers this?
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, this only delegates
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, I see, the question is if this is now redundant. |
||
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.
this is bein caused by the type stability issue i'm p sure
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.
This is the message I get.
┌ MonteCarloTest(S::Type{<:Statistic}, PP::Type{<:AbstractPointProcess}, h::History; kwargs...) @ PointProcesses /home/jkling/projects/PointProcesses.jl/src/HypothesisTests/PPTests/monte_carlo_test.jl:114
│ no matching method found
kwcall(::NamedTuple, ::Type{MonteCarloTest}, ::Type{<:Statistic}, ::Rician, ::History)(1/4 union split): Core.kwcall(merge(NamedTuple()::@NamedTuple{}, kwargs::@kwargs{…})::NamedTuple, MonteCarloTest, S::Type{<:Statistic}, pp_est::Union{Rician, HawkesProcess, IndependentMultivariateProcess, PoissonProcess}, h::History)└────────────────────
Apparently, the static analysis thinks that
Ricianis a possible return type offit(Ricianis aDistributions.Distribution). Not sure how to deal with this if not by type annotating this line.