Skip to content

Commit

Permalink
Fix typos (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
cybaol authored Jul 8, 2024
1 parent 8bfec92 commit b9ce739
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down Expand Up @@ -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})
Expand Down
4 changes: 2 additions & 2 deletions cmake/InstallBasicPackageFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function generates 3 files:
If neither ``UPPERCASE_FILENAMES`` nor ``LOWERCASE_FILENAMES`` is
set, a file ``<Name>Config.cmake.in`` or
``<name>-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
Expand Down Expand Up @@ -585,7 +585,7 @@ ${_compatibility_vars}
endforeach()


# <Name>ConfigVersion.cmake file (same for build tree and intall)
# <Name>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}
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/mpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion example/src/MPCExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ int main()
Eigen::Matrix<double, 12, 1> x0;
Eigen::Matrix<double, 12, 1> xRef;

// allocate QP problem matrices and vectores
// allocate QP problem matrices and vectors
Eigen::SparseMatrix<double> hessian;
Eigen::VectorXd gradient;
Eigen::SparseMatrix<double> linearMatrix;
Expand Down
2 changes: 1 addition & 1 deletion include/OsqpEigen/Data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion include/OsqpEigen/Settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
10 changes: 5 additions & 5 deletions include/OsqpEigen/Solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename T>
bool evaluateNewValues(const std::vector<Eigen::Triplet<T>>& oldMatrixTriplet,
Expand Down Expand Up @@ -144,7 +144,7 @@ class Solver
bool isInitialized();

/**
* Dealocate memory.
* Deallocate memory.
*/
void clearSolver();

Expand Down Expand Up @@ -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<c_float, -1, 1>& 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<c_float, -1, 1>& getDualSolution();

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/OsqpEigen/Solver.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ bool OsqpEigen::Solver::evaluateNewValues(const std::vector<Eigen::Triplet<T>>&
std::vector<c_int>& newIndices,
std::vector<c_float>& 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
Expand Down
4 changes: 2 additions & 2 deletions include/OsqpEigen/SparseMatrixHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
8 changes: 4 additions & 4 deletions tests/MPCTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ TEST_CASE("MPCTest")
Eigen::Matrix<c_float, 12, 1> x0;
Eigen::Matrix<c_float, 12, 1> xRef;

// allocate QP problem matrices and vectores
// allocate QP problem matrices and vectors
Eigen::SparseMatrix<c_float> hessian;
Eigen::Matrix<c_float, -1, 1> gradient;
Eigen::SparseMatrix<c_float> linearMatrix;
Expand Down Expand Up @@ -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++)
{
Expand Down Expand Up @@ -324,13 +324,13 @@ TEST_CASE("MPCTest")

endTime = clock();

avarageTime += static_cast<double>(endTime - startTime) / CLOCKS_PER_SEC;
averageTime += static_cast<double>(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;
Expand Down
8 changes: 4 additions & 4 deletions tests/MPCUpdateMatricesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ TEST_CASE("MPCTest Update matrices")
Eigen::Matrix<c_float, 1, 1> yRef;
Eigen::Matrix<c_float, 1, 1> y;

// allocate QP problem matrices and vectores
// allocate QP problem matrices and vectors
Eigen::SparseMatrix<c_float> hessian;
Eigen::Matrix<c_float, -1, 1> gradient;
Eigen::SparseMatrix<c_float> linearMatrix;
Expand Down Expand Up @@ -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++)
{
Expand Down Expand Up @@ -310,12 +310,12 @@ TEST_CASE("MPCTest Update matrices")

endTime = clock();

avarageTime += static_cast<double>(endTime - startTime) / CLOCKS_PER_SEC;
averageTime += static_cast<double>(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;
}

0 comments on commit b9ce739

Please sign in to comment.