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

Tidy src/atoms/second_order_cone #541

Merged
merged 1 commit into from Jan 10, 2024
Merged

Tidy src/atoms/second_order_cone #541

merged 1 commit into from Jan 10, 2024

Conversation

odow
Copy link
Member

@odow odow commented Jan 10, 2024

x-ref #538

@@ -60,7 +50,8 @@ function rationalnorm(x::AbstractExpr, k::Rational{Int})
if row == 1 || col == 1
return RationalNormAtom(abs(x), k)
end
else
return RationalNormAtom(x, k)
# FIXME(odow): what happens if x is a matrix?
Copy link
Member Author

Choose a reason for hiding this comment

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

Follow-up later. The function previously returned nothing if x was a complex matrix.

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (8dfc7f6) 92.83% compared to head (42181be) 92.71%.

Files Patch % Lines
src/atoms/second_order_cone/quadform.jl 70.00% 3 Missing ⚠️
src/atoms/second_order_cone/qol_elementwise.jl 80.00% 2 Missing ⚠️
src/atoms/second_order_cone/rationalnorm.jl 71.42% 2 Missing ⚠️
src/atoms/second_order_cone/huber.jl 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #541      +/-   ##
==========================================
- Coverage   92.83%   92.71%   -0.13%     
==========================================
  Files          86       86              
  Lines        5375     5326      -49     
==========================================
- Hits         4990     4938      -52     
- Misses        385      388       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@odow odow mentioned this pull request Jan 10, 2024

## Create a new variable euc_norm to represent the norm
Copy link
Member

Choose a reason for hiding this comment

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

Maybe move it to a docstring ?

Copy link
Member Author

Choose a reason for hiding this comment

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

This comment was outdated so I deleted it. The function did not in fact create a new variable euc_norm to represent the norm. I think it mean t, and okay, by reading the function I see it is building [t, x] in SOC. I don't think it needs a comment saying that.

@odow odow changed the base branch from od/atoms-lp to master January 10, 2024 20:28
@odow odow merged commit 66c3a40 into master Jan 10, 2024
8 of 10 checks passed
@odow odow deleted the od/atoms-socp branch January 10, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants