-
Notifications
You must be signed in to change notification settings - Fork 32
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
#375 - Intersection of a halfspace with polyhedron: line search method #677
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ccc6870
add _line_search method
mforets be16d7c
add σ
mforets 4ed09c3
comment wrong σ
mforets 917f3d6
remove wrong supp vec
mforets 2d73b3a
update travis with Optim for tests
mforets 8df205b
update docstrings
mforets be8a906
update doctest
mforets 4a2da97
temp non-strict docs build
mforets 7e10446
add unit test for new function
mforets c31688e
empty space
mforets d66a603
fix unit test
mforets 1f82f4a
add REQUIRE to tests
mforets File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
julia 0.6 | ||
Compat 1.0 | ||
Expokit 0.1 | ||
GLPKMathProgInterface 0.4 | ||
IntervalArithmetic 0.14 | ||
MathProgBase 0.7 | ||
RecipesBase 0.3 | ||
Requires 0.4 | ||
Optim 0.14.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. new line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,3 +53,16 @@ for N in [Float64, Rational{Int}, Float32] | |
@test absorbing(Intersection) == absorbing(IntersectionArray) == EmptySet | ||
@test I ∩ E == E ∩ I == IA ∩ E == E ∩ IA == E ∩ E == E | ||
end | ||
|
||
# ====================== | ||
# Tests for Float64 only | ||
# ====================== | ||
|
||
# halfspace - ball1 intersection | ||
X = Ball1(zeros(2), 1.0); | ||
H = HalfSpace([-1.0, 0.0], -1.0); # x >= 0 | ||
d = normalize([1.0, 0.0]) | ||
|
||
# line search using Optim | ||
using Optim | ||
@test ρ(d, X ∩ H) == ρ(d, X ∩ H) == 1.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the second expression be the symmetric case? |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
check_intersection
argument is missing here.