Skip to content

Commit

Permalink
Per #3030, reduce the volume of SonarQube code smells.
Browse files Browse the repository at this point in the history
  • Loading branch information
MET Tools Test Account committed Dec 12, 2024
1 parent 9d876c4 commit 0a0beb6
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 147 deletions.
2 changes: 1 addition & 1 deletion src/libcode/vx_statistics/met_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3875,10 +3875,10 @@ void GRADInfo::set_stat(const string &stat_name, double v) {
else if(stat_name == "OGMAG" ) ogmag = v;
else if(stat_name == "MAG_RMSE" ) mag_mse = v*v;
else if(stat_name == "LAPLACE_RMSE") lap_mse = v*v;
// Ignore derived quantities
else if(stat_name == "S1" ||
stat_name == "S1_OG" ||
stat_name == "FGOG_RATIO") {
// Ignore derived quantities
}
else {
mlog << Error << "\nGRADInfo::set_stat() -> "
Expand Down
11 changes: 8 additions & 3 deletions src/libcode/vx_statistics/met_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,16 @@ class GRADInfo {
int total;

// Gradient Partial sums
double fgbar, ogbar, mgbar, egbar;
double fgbar;
double ogbar;
double mgbar;
double egbar;

// Gradient Vector Partial Sums
double fgmag, ogmag;
double mag_mse, lap_mse;
double fgmag;
double ogmag;
double mag_mse;
double lap_mse;

// Gradient Statistics
double s1() const; // s1 = 100 * egbar / mgbar
Expand Down
Loading

0 comments on commit 0a0beb6

Please sign in to comment.