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

Projection on the epigraph of the squared Euclidean norm #334

Merged
merged 15 commits into from
Mar 20, 2024

merge master and fix conflicts

36082fd
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

Projection on the epigraph of the squared Euclidean norm #334

merge master and fix conflicts
36082fd
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Nov 7, 2023 in 0s

clippy

7 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 7
Note 0
Help 0

Versions

  • rustc 1.73.0 (cc66ad468 2023-10-03)
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (cc66ad4 2023-10-03)

Annotations

Check warning on line 87 in src/constraints/epigraph_squared_norm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the loop variable `i` is only used to index `x`

warning: the loop variable `i` is only used to index `x`
  --> src/constraints/epigraph_squared_norm.rs:87:18
   |
87 |         for i in 0..nx {
   |                  ^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
   = note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator
   |
87 |         for <item> in x.iter_mut().take(nx) {
   |             ~~~~~~    ~~~~~~~~~~~~~~~~~~~~~

Check warning on line 80 in src/constraints/epigraph_squared_norm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual implementation of an assign operation

warning: manual implementation of an assign operation
  --> src/constraints/epigraph_squared_norm.rs:80:13
   |
80 |             zsol = zsol - p_z / dp_z;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `zsol -= p_z / dp_z`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
   = note: `#[warn(clippy::assign_op_pattern)]` on by default

Check warning on line 65 in src/constraints/epigraph_squared_norm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
  --> src/constraints/epigraph_squared_norm.rs:64:18
   |
64 |                   }
   |  __________________^
65 | |                 return;
   | |______________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
   = note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
   |
64 -                 }
65 -                 return;
64 +                 }
   |

Check warning on line 42 in src/constraints/epigraph_squared_norm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> src/constraints/epigraph_squared_norm.rs:42:58
   |
42 |         let norm_z_sq = matrix_operations::norm2_squared(&z);
   |                                                          ^^ help: change this to: `z`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `#[warn(clippy::needless_borrow)]` on by default

Check warning on line 16 in src/constraints/epigraph_squared_norm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you should consider adding a `Default` implementation for `EpigraphSquaredNorm`

warning: you should consider adding a `Default` implementation for `EpigraphSquaredNorm`
  --> src/constraints/epigraph_squared_norm.rs:14:5
   |
14 | /     pub fn new() -> Self {
15 | |         EpigraphSquaredNorm {}
16 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
10 + impl Default for EpigraphSquaredNorm {
11 +     fn default() -> Self {
12 +         Self::new()
13 +     }
14 + }
   |

Check warning on line 145 in src/alm/alm_problem.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (9/7)

warning: this function has too many arguments (9/7)
   --> src/alm/alm_problem.rs:135:5
    |
135 | /     pub fn new(
136 | |         constraints: ConstraintsType,
137 | |         alm_set_c: Option<AlmSetC>,
138 | |         alm_set_y: Option<LagrangeSetY>,
...   |
144 | |         n2: usize,
145 | |     ) -> Self {
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 167 in src/alm/alm_factory.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> src/alm/alm_factory.rs:158:5
    |
158 | /     pub fn new(
159 | |         f: Cost,
160 | |         df: CostGradient,
161 | |         mapping_f1: Option<MappingF1>,
...   |
166 | |         n2: usize,
167 | |     ) -> Self {
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
    = note: `#[warn(clippy::too_many_arguments)]` on by default