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

Rename lt0 -> gte0 #363

Merged
merged 4 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions inst/stan/base/functions.stan
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ functions {

// Replaces the values of `y` with `replacement` if the corresponding value
// of `x` is less than 0.
matrix if_lt0_else(matrix x, matrix y, real replacement) {
matrix if_gte0_else(matrix x, matrix y, real replacement) {
matrix[rows(x), cols(x)] result;
for (i in 1:rows(x)) {
for (j in 1:cols(x)) {
Expand All @@ -93,7 +93,7 @@ functions {
}
return result;
}
vector if_lt0_else(vector x, vector y, real replacement) {
vector if_gte0_else(vector x, vector y, real replacement) {
vector[rows(x)] result;
for (i in 1:rows(x)) {
result[i] = x[i] < 0 ? replacement : y[i];
Expand Down
2 changes: 1 addition & 1 deletion inst/stan/lm-gsf/functions.stan
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ functions {
vector psi_phi
) {
int nrow = rows(time);
vector[nrow] psi_phi_mod = if_lt0_else(time, psi_phi, 0);
vector[nrow] psi_phi_mod = if_gte0_else(time, psi_phi, 0);

vector[nrow] result = fmin(
8000.0,
Expand Down
2 changes: 1 addition & 1 deletion inst/stan/lm-gsf/link_dsld.stan
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ functions {
matrix[nrows, ncols] psi_kg_matrix = rep_matrix(psi_kg, ncols);
matrix[nrows, ncols] psi_phi_matrix = rep_matrix(psi_phi, ncols);

psi_phi_matrix = if_lt0_else(time, psi_phi_matrix, 0);
psi_phi_matrix = if_gte0_else(time, psi_phi_matrix, 0);

matrix[nrows, ncols] result = fmin(
8000.0,
Expand Down
2 changes: 1 addition & 1 deletion inst/stan/lm-stein-fojo/functions.stan
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ functions {
vector psi_kg
) {
int n = rows(time);
vector[n] psi_ks_mod = if_lt0_else(time, psi_ks, 0);
vector[n] psi_ks_mod = if_gte0_else(time, psi_ks, 0);
vector[n] result = fmin(
8000.0,
psi_bsld .* (
Expand Down
2 changes: 1 addition & 1 deletion inst/stan/lm-stein-fojo/link_dsld.stan
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ functions {
matrix[nrows, ncols] psi_ks_matrix = rep_matrix(psi_ks, ncols);
matrix[nrows, ncols] psi_kg_matrix = rep_matrix(psi_kg, ncols);

matrix[nrows, ncols] psi_ks_matrix_mod = if_lt0_else(time, psi_ks_matrix, 0);
matrix[nrows, ncols] psi_ks_matrix_mod = if_gte0_else(time, psi_ks_matrix, 0);

matrix[nrows, ncols] result = fmin(
8000.0,
Expand Down
Loading