Skip to content

Commit

Permalink
Use vec.back()
Browse files Browse the repository at this point in the history
  • Loading branch information
daniandtheweb committed Aug 24, 2024
1 parent 97dffac commit b1b0b41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions denoiser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ std::vector<double> linear_interp(std::vector<float> new_x,
}

/* Adjusted bounds checking to ensure new_x is within ref_x range */
if ((new_x[0] < ref_x[0])) {
if (new_x[0] < ref_x[0]) {
new_x[0] = ref_x[0];
}
if ((new_x[new_x.size() - 1] > ref_x[ref_x.size() - 1])) {
new_x[new_x.size() - 1] = ref_x[ref_x.size() - 1];
if (new_x.back() > ref_x.back()) {
new_x.back() = ref_x.back();
}

while (i < len_x) {
Expand Down Expand Up @@ -182,7 +182,7 @@ struct AYSSchedule : SigmaSchedule {
}
};

/*
/*
* GITS Scheduler: https://github.com/zju-pi/diff-sampler/tree/main/gits-main
*/
struct GITSSchedule : SigmaSchedule {
Expand Down

0 comments on commit b1b0b41

Please sign in to comment.