-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
Add support for skew symmetric variables #2416
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2416 +/- ##
==========================================
+ Coverage 92.19% 92.21% +0.02%
==========================================
Files 43 43
Lines 4597 4613 +16
==========================================
+ Hits 4238 4254 +16
Misses 359 359
Continue to review full report at Codecov.
|
test/variable.jl
Outdated
@@ -482,6 +482,30 @@ function test_variable_symmetric(ModelType, ::Any) | |||
@test y[1, 2] === y[2, 1] | |||
end | |||
|
|||
function test_variable_skewsymmetric(ModelType, ::Any) | |||
model = ModelType() | |||
@variable(model, x[1:2, 1:2] in SkewSymMatrixSpace()) |
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.
So I've been playing with this, and the syntax is pretty restrictive. (This also applied to symmetric matrices.)
For example, we don't support
@variable(model, x[2:3, 2:3] in SkewSymMatrixSpace())
because it isn't apparent you can have a symmetric DenseAxisArray
.
But if users are forced to write
@variable(model, x[1:3, 1:3] in SkewSymMatrixSpace())
why not just
@variable(model, X in SkewSymMatrixSpace(3))
For anonymous variables, we could support
X = @variable(model, _ in SkewSymMatrixSpace(3))
We can keep discussing different syntax in the next monthly developer call. |
Rebased from #2147
Closes #2146
cc @frederikgeth