Skip to content

Commit

Permalink
define has_oop methods
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Dec 17, 2024
1 parent 4e68925 commit 63a22a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/measurement_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ function CompositeMeasurementModel(m1, rest...)
end

isinplace(model::CompositeMeasurementModel) = isinplace(model.models[1])
has_ip(model::CompositeMeasurementModel) = has_ip(model.models[1])

Check warning on line 34 in src/measurement_model.jl

View check run for this annotation

Codecov / codecov/patch

src/measurement_model.jl#L34

Added line #L34 was not covered by tests
has_oop(model::CompositeMeasurementModel) = has_oop(model.models[1])

function measurement(model::CompositeMeasurementModel)
function (x,u,p,t)
Expand Down Expand Up @@ -84,6 +86,8 @@ struct UKFMeasurementModel{IPM,AUGM,MT,RT,IT,MET,CT,CCT,CAT} <: AbstractMeasurem
end

isinplace(::UKFMeasurementModel{IPM}) where IPM = IPM
has_ip(::UKFMeasurementModel{IPM}) where IPM = IPM

Check warning on line 89 in src/measurement_model.jl

View check run for this annotation

Codecov / codecov/patch

src/measurement_model.jl#L89

Added line #L89 was not covered by tests
has_oop(::UKFMeasurementModel{IPM}) where IPM = !IPM

"""
UKFMeasurementModel{inplace_measurement,augmented_measurement}(measurement, R2, ny, ne, innovation, mean, cov, cross_cov, cache = nothing)
Expand Down Expand Up @@ -241,6 +245,8 @@ struct EKFMeasurementModel{IPM,MT,RT,CJ,CAT} <: AbstractMeasurementModel
end

isinplace(::EKFMeasurementModel{IPM}) where IPM = IPM
has_ip(::EKFMeasurementModel{IPM}) where IPM = IPM

Check warning on line 248 in src/measurement_model.jl

View check run for this annotation

Codecov / codecov/patch

src/measurement_model.jl#L248

Added line #L248 was not covered by tests
has_oop(::EKFMeasurementModel{IPM}) where IPM = !IPM

"""
EKFMeasurementModel{IPM}(measurement, R2, ny, Cjac, cache = nothing)
Expand Down

0 comments on commit 63a22a8

Please sign in to comment.