Skip to content

Commit

Permalink
A few bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bjack205 committed Mar 2, 2022
1 parent 85811e5 commit 103d4f6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/deprecate.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@deprecate state_diff_jacobian!(args...) errstate_jacobian!(args...)
@deprecate ∇²differential!(args...) ∇errstate_jacobian!(args...)
@deprecate SampledTrajectory(X,U,dt::Vector{<:Real}) Sampled(X,U,dt=dt)
@deprecate Sampled(x::AbstractVector{<:Real}, u::AbstractVector{<:Real}, dt::AbstractVector{<:Real}) Traj([copy(x) for k = 1:length(dt)], [copy(u) for k = 1:length(dt)-1], dt=dt)
@deprecate SampledTrajectory(X,U,dt::Vector{<:Real}) SampledTrajectory(X,U,dt=dt)
@deprecate SampledTrajectory(x::AbstractVector{<:Real}, u::AbstractVector{<:Real}, dt::AbstractVector{<:Real}) Traj([copy(x) for k = 1:length(dt)], [copy(u) for k = 1:length(dt)-1], dt=dt)
@deprecate get_data(x::SampledTrajectory) getdata(x)
Base.Base.@deprecate_binding Traj SampledTrajectory true

Expand Down
11 changes: 9 additions & 2 deletions src/statevectortype.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,12 @@ the state vector space. The vector ``\\bar{x}`` is some element of the state spa
errstate_dim(::EuclideanState, fun::AbstractFunction) = state_dim(fun)
state_diff!(::EuclideanState, fun::AbstractFunction, dx, x, x0) = dx .= x .- x0
state_diff(::EuclideanState, fun::AbstractFunction, x, x0) = x - x0
errstate_jacobian!(::EuclideanState, fun::AbstractFunction, J, x) = J .= I(state_dim(fun))
∇errstate_jacobian!(::EuclideanState, fun::AbstractFunction, ∇G, x, dx) = ∇G .= 0
∇errstate_jacobian!(::EuclideanState, fun::AbstractFunction, ∇G, x, dx) = ∇G .= 0

function errstate_jacobian!(::EuclideanState, fun::AbstractFunction, J, x)
J .= 0
for i = 1:size(J,1)
J[i,i] = one(eltype(J))
end
return nothing
end
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ end
function Base.showerror(io::IO, err::NotImplementedError)
print(io, "NotImplementedError: ")
print(io, err.msg)
end
end

2 comments on commit 103d4f6

@bjack205
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/55814

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.3 -m "<description of version>" 103d4f663ee12b44229f0567645b14d0a528bc94
git push origin v0.4.3

Please sign in to comment.