Skip to content

Commit

Permalink
fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhruva2 committed Jul 24, 2023
1 parent ed23040 commit c5a3ab9
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 371 deletions.
133 changes: 0 additions & 133 deletions src/BasicUpdates.jl

This file was deleted.

7 changes: 3 additions & 4 deletions src/InteractionSpecification.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ struct InteractionSpecification{I<:Interaction,S,T,N<:Function} <: Specification
record_what::N
end

record_nothing(::Any) = nothing

struct ObservationSpecification{I<:Thing,T,N<:Function} <: Specification
of_what::I
Expand All @@ -22,8 +23,8 @@ ObservationSpecification(i::Interaction, times, what) = InteractionSpecification
Record(t::Thing, times, what) = ObservationSpecification(t, times, what)

### IE if you don't want to record, use the pair syntax
Base.Pair(i::Interaction, t) = InteractionSpecification(i, t, empty(t), summary) #update don't record
Base.Pair(e::Entity, t) = ObservationSpecification(e, t, summary)
Base.Pair(i::Interaction, t) = InteractionSpecification(i, t, empty(t), record_nothing) #update don't record
Base.Pair(e::Entity, t) = ObservationSpecification(e, t, record_nothing)

Record(os::ObservationSpecification, what) = ObservationSpecification(
os.of_what,
Expand All @@ -38,7 +39,6 @@ Record(is::InteractionSpecification, t, what::Function) = InteractionSpecificati
t,
what
)
Record(is::InteractionSpecification, t) = Record(is, t, summary)
Record(is::InteractionSpecification, t, what::Symbol) = Record(is, t, r -> getfield(r, what))

Record(is::InteractionSpecification, what::Function) = InteractionSpecification(
Expand Down Expand Up @@ -69,7 +69,6 @@ nb this == is a bit misleading, but useful for subsequent code. Interaction Spec
==(i1::Specification, i2::Specification) = (==(i1.of_what, i2.of_what)) && ==(i1.record_what, i2.record_what)


summary(i::Interaction) = i



Expand Down
150 changes: 0 additions & 150 deletions src/Particles.jl

This file was deleted.

17 changes: 0 additions & 17 deletions src/SimulationHelper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,7 @@ include("RecordBuilder.jl")

export Recorder, name, get_record, difference

# include("BasicUpdates.jl")

# export StateUpdate, Measurement, MovingCovarianceEstimator, OptimalKalmanGain, OptimalKalmanGain2, KalmanGainDiff, CumulativeSquaredError, ExternalFunctionUpdate

export summary

include("PlotBuilder.jl")


include("Particles.jl")

export Particle, ParticleCollection, ParticleWeightUpdate, Resampler, SystematicResampler

export states, weights, resampled
# export collection_average, collection_variance, get_particle_updates

include("SimulationStatistics.jl")

# export do_repeats, param_against_difference, param_against_summary, param_against_summary_repeated,

end
Loading

0 comments on commit c5a3ab9

Please sign in to comment.