Skip to content

Commit

Permalink
fixed sonarcube bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Serrof committed Feb 8, 2025
1 parent 264e57a commit 207862d
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ public FieldMatrix<T> getInverse() {
private boolean checkSingular(T[] diag,
T min,
boolean raise) {
final int len = diag.length;
for (final T d : diag) {
if (FastMath.abs(d.getReal()) <= min.getReal()) {
if (raise) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ public RealMatrix getInverse() {
* {@code raise} is {@code true}.
*/
private boolean checkSingular(double[] diag, double min, boolean raise) {
final int len = diag.length;
for (final double d : diag) {
if (FastMath.abs(d) <= min) {
if (raise) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
Expand Down Expand Up @@ -954,7 +953,6 @@ public static void sortInPlace(double[] x,
throw new NullArgumentException();
}

final int yListLen = yList.length;
final int len = x.length;

for (final double[] y : yList) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public T[] getScaled() {
* @return Nordsieck vector
*/
public Array2DRowFieldMatrix<T> getNordsieck() {
return nordsieck;
return new Array2DRowFieldMatrix<>(nordsieck.getData());
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public double[] getScaled() {
* @return Nordsieck vector
*/
public Array2DRowRealMatrix getNordsieck() {
return nordsieck;
return new Array2DRowRealMatrix(nordsieck.getData());
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
package org.hipparchus.optim.nonlinear.scalar;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

Expand All @@ -34,7 +33,6 @@

/**
* Multi-start optimizer.
*
* This class wraps an optimizer in order to use it several times in
* turn with different starting points (trying to avoid being trapped
* in a local extremum when looking for a global one).
Expand Down

0 comments on commit 207862d

Please sign in to comment.