diff --git a/CMakeLists.txt b/CMakeLists.txt index 004fa23..b92d8e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ set(OsqpEigen_VERSION "${OsqpEigen_MAJOR_VERSION}.${OsqpEigen_MINOR_VERSION}.${O # Set project version project(OsqpEigen VERSION ${OsqpEigen_VERSION}) -# ouptut paths +# output paths set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") @@ -78,7 +78,7 @@ include(OsqpEigenDependencies) if(NOT CMAKE_CONFIGURATION_TYPES) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release" CACHE STRING - "Choose the type of build, recommanded options are: Debug or Release" FORCE) + "Choose the type of build, recommended options are: Debug or Release" FORCE) endif() set(OSQPEIGEN_BUILD_TYPES "Debug" "Release" "MinSizeRel" "RelWithDebInfo") set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${OSQPEIGEN_BUILD_TYPES}) diff --git a/cmake/InstallBasicPackageFiles.cmake b/cmake/InstallBasicPackageFiles.cmake index 077b95d..9a5d10d 100644 --- a/cmake/InstallBasicPackageFiles.cmake +++ b/cmake/InstallBasicPackageFiles.cmake @@ -44,7 +44,7 @@ function generates 3 files: If neither ``UPPERCASE_FILENAMES`` nor ``LOWERCASE_FILENAMES`` is set, a file ``Config.cmake.in`` or ``-config.cmake.in`` is searched, and the convention -is chosed according to the file found. If no file was found, the +is chosen according to the file found. If no file was found, the uppercase convention is used. The ``DEPENDENCIES`` argument can be used to set a list of dependencies @@ -585,7 +585,7 @@ ${_compatibility_vars} endforeach() - # ConfigVersion.cmake file (same for build tree and intall) + # ConfigVersion.cmake file (same for build tree and install) write_basic_package_version_file("${_IBPF_EXPORT_DESTINATION}/${_version_filename}" VERSION ${_IBPF_VERSION} COMPATIBILITY ${_IBPF_COMPATIBILITY} diff --git a/docs/pages/mpc.md b/docs/pages/mpc.md index 5903aed..023c101 100644 --- a/docs/pages/mpc.md +++ b/docs/pages/mpc.md @@ -100,7 +100,7 @@ Since the osqp-eigen handles only QP problem this operation shall be done by the castMPCToQPHessian(Q, R, mpcWindow, hessian); castMPCToQPGradient(Q, xRef, mpcWindow, gradient); castMPCToQPConstraintMatrix(a, b, mpcWindow, linearMatrix); -castMPCToQPConstraintVectores(xMax, xMin, uMax, uMin, x0, mpcWindow, lowerBound, upperBound); +castMPCToQPConstraintVectors(xMax, xMin, uMax, uMin, x0, mpcWindow, lowerBound, upperBound); \endcode \subsection OSQP_init Solver initialization diff --git a/example/src/MPCExample.cpp b/example/src/MPCExample.cpp index 6ee6b63..789c975 100644 --- a/example/src/MPCExample.cpp +++ b/example/src/MPCExample.cpp @@ -227,7 +227,7 @@ int main() Eigen::Matrix x0; Eigen::Matrix xRef; - // allocate QP problem matrices and vectores + // allocate QP problem matrices and vectors Eigen::SparseMatrix hessian; Eigen::VectorXd gradient; Eigen::SparseMatrix linearMatrix; diff --git a/include/OsqpEigen/Data.hpp b/include/OsqpEigen/Data.hpp index 58173ee..97ab88c 100644 --- a/include/OsqpEigen/Data.hpp +++ b/include/OsqpEigen/Data.hpp @@ -78,7 +78,7 @@ class Data /** * Set the quadratic part of the cost function (Hessian). - * It is assumed to be a simmetric matrix. + * It is assumed to be a symmetric matrix. * @param hessianMatrix is the Hessian matrix. * @return true/false in case of success/failure. */ diff --git a/include/OsqpEigen/Settings.hpp b/include/OsqpEigen/Settings.hpp index 938c0cb..07e1c8d 100644 --- a/include/OsqpEigen/Settings.hpp +++ b/include/OsqpEigen/Settings.hpp @@ -99,7 +99,7 @@ class Settings /** * Set the absolute convergence tolerance. - * @param absoluteTolerance absoulte tolerance of the solver. + * @param absoluteTolerance absolute tolerance of the solver. */ void setAbsoluteTolerance(const double absoluteTolerance); diff --git a/include/OsqpEigen/Solver.hpp b/include/OsqpEigen/Solver.hpp index d404398..f6072b0 100644 --- a/include/OsqpEigen/Solver.hpp +++ b/include/OsqpEigen/Solver.hpp @@ -66,7 +66,7 @@ class Solver * @param newIndices vector of the index mapping new elements * to position in the sparse matrix; * @param newValues vector of new elements in the sparse matrix. - * @return true if the sparsity patern is not changed false otherwise. + * @return true if the sparsity pattern is not changed false otherwise. */ template bool evaluateNewValues(const std::vector>& oldMatrixTriplet, @@ -144,7 +144,7 @@ class Solver bool isInitialized(); /** - * Dealocate memory. + * Deallocate memory. */ void clearSolver(); @@ -180,13 +180,13 @@ class Solver /** * Get the optimization problem solution. - * @return an Eigen::Vector contating the optimization result. + * @return an Eigen::Vector containing the optimization result. */ const Eigen::Matrix& getSolution(); /** * Get the dual optimization problem solution. - * @return an Eigen::Vector contating the optimization result. + * @return an Eigen::Vector containing the optimization result. */ const Eigen::Matrix& getDualSolution(); @@ -238,7 +238,7 @@ class Solver /** * Update the quadratic part of the cost function (Hessian). - * It is assumed to be a simmetric matrix. + * It is assumed to be a symmetric matrix. * \note * If the sparsity pattern is preserved the matrix is simply update * otherwise the entire solver will be reinitialized. In this case diff --git a/include/OsqpEigen/Solver.tpp b/include/OsqpEigen/Solver.tpp index d17ec1c..38e6cf5 100644 --- a/include/OsqpEigen/Solver.tpp +++ b/include/OsqpEigen/Solver.tpp @@ -460,7 +460,7 @@ bool OsqpEigen::Solver::evaluateNewValues(const std::vector>& std::vector& newIndices, std::vector& newValues) const { - // When updating the matrices for osqp, we need to provide the indeces to modify of the value + // When updating the matrices for osqp, we need to provide the indices to modify of the value // vector. The following can work since, when extracting triplets from osqp sparse matrices, the // order of the triplets follows the same order of the value vector. // check if the sparsity pattern is changed diff --git a/include/OsqpEigen/SparseMatrixHelper.hpp b/include/OsqpEigen/SparseMatrixHelper.hpp index 20f403a..6a7508d 100644 --- a/include/OsqpEigen/SparseMatrixHelper.hpp +++ b/include/OsqpEigen/SparseMatrixHelper.hpp @@ -22,8 +22,8 @@ namespace OsqpEigen { /** - * SparseMatrixHelper namespace is a namspace that contains helper function to handle osqp matrix. - * Use it to create ot update or manage an osqp sparse matrix. + * SparseMatrixHelper namespace is a namespace that contains helper function to handle osqp matrix. + * Use it to create to update or manage an osqp sparse matrix. * osqp sparse matrix in [compressed-column](https://people.sc.fsu.edu/~jburkardt/data/cc/cc.html) * or triplet form. */ diff --git a/tests/MPCTest.cpp b/tests/MPCTest.cpp index 059af6f..92cdf5e 100644 --- a/tests/MPCTest.cpp +++ b/tests/MPCTest.cpp @@ -246,7 +246,7 @@ TEST_CASE("MPCTest") Eigen::Matrix x0; Eigen::Matrix xRef; - // allocate QP problem matrices and vectores + // allocate QP problem matrices and vectors Eigen::SparseMatrix hessian; Eigen::Matrix gradient; Eigen::SparseMatrix linearMatrix; @@ -296,7 +296,7 @@ TEST_CASE("MPCTest") // profiling quantities clock_t startTime, endTime; - c_float avarageTime = 0; + c_float averageTime = 0; for (int i = 0; i < numberOfSteps; i++) { @@ -324,13 +324,13 @@ TEST_CASE("MPCTest") endTime = clock(); - avarageTime += static_cast(endTime - startTime) / CLOCKS_PER_SEC; + averageTime += static_cast(endTime - startTime) / CLOCKS_PER_SEC; } // close the stream dataStream.close(); - std::cout << COUT_GTEST_MGT << "Avarage time = " << avarageTime / numberOfSteps << " seconds." + std::cout << COUT_GTEST_MGT << "Average time = " << averageTime / numberOfSteps << " seconds." << ANSI_TXT_DFT << std::endl; constexpr double tolerance = 1e-2; diff --git a/tests/MPCUpdateMatricesTest.cpp b/tests/MPCUpdateMatricesTest.cpp index 7f7b2c2..ea1ff97 100644 --- a/tests/MPCUpdateMatricesTest.cpp +++ b/tests/MPCUpdateMatricesTest.cpp @@ -225,7 +225,7 @@ TEST_CASE("MPCTest Update matrices") Eigen::Matrix yRef; Eigen::Matrix y; - // allocate QP problem matrices and vectores + // allocate QP problem matrices and vectors Eigen::SparseMatrix hessian; Eigen::Matrix gradient; Eigen::SparseMatrix linearMatrix; @@ -273,7 +273,7 @@ TEST_CASE("MPCTest Update matrices") // profiling quantities clock_t startTime, endTime; - double avarageTime = 0; + double averageTime = 0; for (int i = 0; i < numberOfSteps; i++) { @@ -310,12 +310,12 @@ TEST_CASE("MPCTest Update matrices") endTime = clock(); - avarageTime += static_cast(endTime - startTime) / CLOCKS_PER_SEC; + averageTime += static_cast(endTime - startTime) / CLOCKS_PER_SEC; } // close the stream dataStream.close(); - std::cout << COUT_GTEST_MGT << "Avarage time = " << avarageTime / numberOfSteps << " seconds." + std::cout << COUT_GTEST_MGT << "Average time = " << averageTime / numberOfSteps << " seconds." << ANSI_TXT_DFT << std::endl; }