Skip to content
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

Allowing C(X) for arbitrary vector X #135

Merged
merged 1 commit into from
Apr 9, 2019
Merged

Allowing C(X) for arbitrary vector X #135

merged 1 commit into from
Apr 9, 2019

Conversation

yashvardhan747
Copy link
Contributor

@yashvardhan747 yashvardhan747 commented Apr 6, 2019

Fixes #134

@@ -39,7 +39,7 @@ function Base.show(io::IO, C::Contractor{N,Nout,F1,F2,ex}) where {N,Nout,F1,F2,e
print(io, " - expression: $(C.expression)")
end

function (C::Contractor{N,Nout,F1,F2,ex})(X::IntervalBox{N,T}) where {N,Nout,F1,F2,ex,T}
function (C::Contractor{N,Nout,F1,F2,ex})(X) where {N,Nout,F1,F2,ex}
return C.forward(X)[1]
Copy link
Member

Choose a reason for hiding this comment

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

Since you don't need the type parameters, you can write this as

(C::Contractor)(X) = C.forward(X)[1]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh...Right..!!

@yashvardhan747 yashvardhan747 reopened this Apr 9, 2019
@dpsanders dpsanders merged commit 134d494 into JuliaIntervals:master Apr 9, 2019
@dpsanders
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants