From a901e4437ab96afb86110efce845a32921b517cd Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Wed, 19 Jul 2023 09:54:29 -0400 Subject: [PATCH] Fix various spelling mistakes --- src/doxygen/doxygen-footer.html | 2 +- src/doxygen/doxygen.cfg | 6 +++--- src/stan/io/json/json_data.hpp | 4 ++-- src/stan/io/json/json_data_handler.hpp | 2 +- src/stan/mcmc/hmc/nuts/base_nuts.hpp | 2 +- src/stan/mcmc/hmc/xhmc/base_xhmc.hpp | 2 +- src/stan/model/indexing/assign_cl.hpp | 12 ++++++------ src/stan/model/indexing/rvalue.hpp | 2 +- src/stan/model/prob_grad.hpp | 2 +- src/stan/services/pathfinder/psis.hpp | 2 +- src/stan/services/pathfinder/single.hpp | 6 +++--- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/doxygen/doxygen-footer.html b/src/doxygen/doxygen-footer.html index e209f763be7..df6f3e63871 100644 --- a/src/doxygen/doxygen-footer.html +++ b/src/doxygen/doxygen-footer.html @@ -1,5 +1,5 @@
-
+
     [ Stan Home Page ] diff --git a/src/doxygen/doxygen.cfg b/src/doxygen/doxygen.cfg index ca7213605bc..f404bc9d452 100644 --- a/src/doxygen/doxygen.cfg +++ b/src/doxygen/doxygen.cfg @@ -1076,7 +1076,7 @@ HTML_STYLESHEET = # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. +# standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra stylesheet files is of importance (e.g. the last # stylesheet in the list overrules the setting of the previous ones in the @@ -1619,8 +1619,8 @@ EXTRA_PACKAGES = amsmath # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty string, +# for the replacement values of the other commands the user is referred to # HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. diff --git a/src/stan/io/json/json_data.hpp b/src/stan/io/json/json_data.hpp index c16aba62ae7..13c771c3112 100644 --- a/src/stan/io/json/json_data.hpp +++ b/src/stan/io/json/json_data.hpp @@ -28,7 +28,7 @@ namespace json { *

The dimensions and values of variables are accessed by variable name. * The values of a variable are stored as a vector of values and * a vector of array dimensions, where a scalar value consists of - * a single value and an emtpy vector for the dimensionality. + * a single value and an empty vector for the dimensionality. * Multidimensional arrays are stored in column-major order, * meaning the first index changes the most quickly. * If all the values of an array are int values, the array will be @@ -121,7 +121,7 @@ class json_data : public stan::io::var_context { } /** - * Read out the complex values for the variable with the specifed + * Read out the complex values for the variable with the specified * name and return a flat vector of complex values. * * @param name Name of Variable of type string. diff --git a/src/stan/io/json/json_data_handler.hpp b/src/stan/io/json/json_data_handler.hpp index b21db83e914..44861ad2280 100644 --- a/src/stan/io/json/json_data_handler.hpp +++ b/src/stan/io/json/json_data_handler.hpp @@ -552,7 +552,7 @@ class json_data_handler : public stan::json::json_handler { /** For a start array ("[") event we first check that we're not currently * processing the values in an array. We need to do this because JSON - * doesn't distinguish lists of heterogenous elements and arrays. + * doesn't distinguish lists of heterogeneous elements and arrays. * Then we add or update the dimensions of the array variable. */ void start_array() { diff --git a/src/stan/mcmc/hmc/nuts/base_nuts.hpp b/src/stan/mcmc/hmc/nuts/base_nuts.hpp index 38964283c89..b8005fa9c13 100644 --- a/src/stan/mcmc/hmc/nuts/base_nuts.hpp +++ b/src/stan/mcmc/hmc/nuts/base_nuts.hpp @@ -194,7 +194,7 @@ class base_nuts : public base_hmc { this->n_leapfrog_ = n_leapfrog; - // Compute average acceptance probabilty across entire trajectory, + // Compute average acceptance probability across entire trajectory, // even over subtrees that may have been rejected double accept_prob = sum_metro_prob / static_cast(n_leapfrog); diff --git a/src/stan/mcmc/hmc/xhmc/base_xhmc.hpp b/src/stan/mcmc/hmc/xhmc/base_xhmc.hpp index 3883e722726..2ca2d49b1c9 100644 --- a/src/stan/mcmc/hmc/xhmc/base_xhmc.hpp +++ b/src/stan/mcmc/hmc/xhmc/base_xhmc.hpp @@ -115,7 +115,7 @@ class base_xhmc : public base_hmc { this->n_leapfrog_ = n_leapfrog; - // Compute average acceptance probabilty across entire trajectory, + // Compute average acceptance probability across entire trajectory, // even over subtrees that may have been rejected double accept_prob = sum_metro_prob / static_cast(n_leapfrog + 1); diff --git a/src/stan/model/indexing/assign_cl.hpp b/src/stan/model/indexing/assign_cl.hpp index 54478e3d8e1..5c59c9a9863 100644 --- a/src/stan/model/indexing/assign_cl.hpp +++ b/src/stan/model/indexing/assign_cl.hpp @@ -52,7 +52,7 @@ inline const char* print_index_type(const stan::math::matrix_cl&) { * of the assignment * @tparam ExprRhs type of the prim expression on the right hand side of the * assignment - * @tparam RowIndex type of index (a Stan index type or `matrix_cl` instad + * @tparam RowIndex type of index (a Stan index type or `matrix_cl` instead * of `index_multi`) * @param[in,out] expr_lhs expression on the left hand side of the assignment * @param expr_rhs expression on the right hand side of the assignment @@ -86,9 +86,9 @@ inline void assign(ExprLhs&& expr_lhs, ExprRhs&& expr_rhs, const char* name, * @tparam ExprRhs type of the prim expression on the right hand side of the * assignment * @tparam RowIndex type of row index (a Stan index type or `matrix_cl` - * instad of `index_multi`) + * instead of `index_multi`) * @tparam ColIndex type of column index (a Stan index type or `matrix_cl` - * instad of `index_multi`) + * instead of `index_multi`) * @param[in,out] expr_lhs expression on the left hand side of the assignment * @param expr_rhs expression on the right hand side of the assignment * @param name Name of lvalue variable @@ -155,7 +155,7 @@ inline void assign(ExprLhs&& expr_lhs, const ScalRhs& scal_rhs, * @param expr_rhs expression on the right hand side of the assignment * @param name Name of lvalue variable * @param row_index index used for indexing `expr_lhs` (a Stan index type or - * `matrix_cl` instad of `index_multi`) + * `matrix_cl` instead of `index_multi`) * @throw std::out_of_range If the index is out of bounds. * @throw std::invalid_argument If the right hand side size isn't the same as * the indexed left hand side size. @@ -205,9 +205,9 @@ inline void assign(math::var_value>& expr_lhs, * @tparam ExprRhs type of the prim or rev expression on the right hand side of * the assignment * @tparam RowIndex type of row index (a Stan index type or `matrix_cl` - * instad of `index_multi`) + * instead of `index_multi`) * @tparam ColIndex type of column index (a Stan index type or `matrix_cl` - * instad of `index_multi`) + * instead of `index_multi`) * @param[in,out] expr_lhs expression on the left hand side of the assignment * @param expr_rhs expression on the right hand side of the assignment * @param name Name of lvalue variable diff --git a/src/stan/model/indexing/rvalue.hpp b/src/stan/model/indexing/rvalue.hpp index d148a976b35..7a07726c336 100644 --- a/src/stan/model/indexing/rvalue.hpp +++ b/src/stan/model/indexing/rvalue.hpp @@ -514,7 +514,7 @@ inline plain_type_t rvalue(EigMat&& x, const char* name, } /** - * Return a column of a matrix with the range of the column specificed + * Return a column of a matrix with the range of the column specified * by another index. * * Types: matrix[Idx, uni] = vector diff --git a/src/stan/model/prob_grad.hpp b/src/stan/model/prob_grad.hpp index 17feb76c36c..a25ce7877f6 100644 --- a/src/stan/model/prob_grad.hpp +++ b/src/stan/model/prob_grad.hpp @@ -75,7 +75,7 @@ class prob_grad { inline std::pair param_range_i(size_t idx) const { if (idx <= param_ranges_i__.size()) { std::stringstream ss; - ss << "param_range_i(): No integer paramter at index " << idx; + ss << "param_range_i(): No integer parameter at index " << idx; std::string msg = ss.str(); throw std::out_of_range(msg); } diff --git a/src/stan/services/pathfinder/psis.hpp b/src/stan/services/pathfinder/psis.hpp index 7674af44bb7..963f0593d49 100644 --- a/src/stan/services/pathfinder/psis.hpp +++ b/src/stan/services/pathfinder/psis.hpp @@ -234,7 +234,7 @@ template inline Eigen::Array psis_weights( const EigArray& log_ratios, Eigen::Index tail_len, Logger& logger) { const auto S = log_ratios.size(); - // shift log ratios for safer exponentation + // shift log ratios for safer exponentiation const double max_log_ratio = log_ratios.maxCoeff(); Eigen::Array llr_weights = log_ratios.array() - max_log_ratio; diff --git a/src/stan/services/pathfinder/single.hpp b/src/stan/services/pathfinder/single.hpp index 9e2b5705974..401335c6b22 100644 --- a/src/stan/services/pathfinder/single.hpp +++ b/src/stan/services/pathfinder/single.hpp @@ -76,9 +76,9 @@ struct taylor_approx_t { Eigen::VectorXd x_center; // Mean estimate double logdetcholHk; // Log deteriminant of the cholesky Eigen::MatrixXd L_approx; // Approximate choleskly - Eigen::MatrixXd Qk; // Q of the QR decompositon. Only used for sparse approx + Eigen::MatrixXd Qk; // Q of the QR decomposition. Only used for sparse approx Eigen::VectorXd alpha; // diagonal of the initial inv hessian - bool use_full; // boolean indicationg if full or sparse approx was used. + bool use_full; // boolean indicating if full or sparse approx was used. }; /** @@ -829,7 +829,7 @@ inline auto pathfinder_lbfgs_single( if (refresh != 0) { logger.info(path_num + "Best Iter: [" + std::to_string(best_iteration) + "] ELBO (" + std::to_string(elbo_best.elbo) + ")" - + " evalutions: (" + std::to_string(num_evals) + ")"); + + " evaluations: (" + std::to_string(num_evals) + ")"); } } Eigen::Array constrained_draws_mat;