Bridge.jl icon indicating copy to clipboard operation
Bridge.jl copied to clipboard

Heads-up: replacement of SamplePath

Open mschauer opened this issue 6 years ago • 1 comments

I am working on a more flexible implementation of SamplePath. I hope you appreciate renaming tt and yy fields t and x. You can follow design here:

https://github.com/mschauer/Trajectories.jl

mschauer avatar Nov 01 '18 14:11 mschauer

We can have a smooth transition via

# Compability with Bridge
function getproperty(X::Trajectory, s::Symbol)
    if s == :tt
        warn("fieldname `tt` changed to `t` ")
        s = :t
    elseif s == :yy
        warn("fieldname `yy` changed to `x` ")
        s = :x
    end
    (s == :t || s == :x) && return getfield(X, s)
    error("getproperty: type Trajectory has no field $s")
end

mschauer avatar Nov 03 '18 11:11 mschauer