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

Add two utility functions to HighsDomain.cpp #1784

Merged
merged 19 commits into from
Jun 30, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion extern/zstr/strict_fstream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
namespace strict_fstream
{

// Help people out a bit, it seems like this is a common recommenation since
// Help people out a bit, it seems like this is a common recommendation since
// musl breaks all over the place.
#if defined(__NEED_size_t) && !defined(__MUSL__)
#warning "It seems to be recommended to patch in a define for __MUSL__ if you use musl globally: https://www.openwall.com/lists/musl/2013/02/10/5"
Expand Down
2 changes: 1 addition & 1 deletion src/ipm/ipx/crossover.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Crossover {
// as long as the Crossover object is used.
Crossover(const Control& control);

// First runs the dual push phase; if this was succesful, then runs the
// First runs the dual push phase; if this was successful, then runs the
// primal push phase.
//
// weights: Must either be NULL or an array of size n+m.
Expand Down
2 changes: 1 addition & 1 deletion src/ipm/ipx/forrest_tomlin.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace ipx {

// Generic implementation of the Forrest-Tomlin update [1] that can be used with
// any LU factorization. The implementation does not exploit hypersparsity,
// which exludes its use for such problems. For non-hypersparse problems the
// which excludes its use for such problems. For non-hypersparse problems the
// implementation is better suited than BASICLU, however, because it stores L
// and U in compressed form with permuted indices; hence solving triangular
// systems with a dense rhs/lhs accesses memory contiguously. BASICLU could not
Expand Down
2 changes: 1 addition & 1 deletion src/ipm/ipx/indexed_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace ipx {
// otherwise.
//
// When modifying the vector changes its pattern (e.g. by writing to v[i] for an
// arbitray index i), you have to invalidate the pattern or provide the new one.
// arbitrary index i), you have to invalidate the pattern or provide the new one.

class IndexedVector {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/ipm/ipx/iterate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ void Iterate::Postprocess() {

// For fixed variables compute xl[j] and xu[j] from x[j]. If the lower and
// upper bound are equal, set zl[j] or zu[j] such that the variable is dual
// feasibile. Otherwise leave them zero.
// feasible. Otherwise leave them zero.
for (Int j = 0; j < n+m; j++) {
if (StateOf(j) == State::fixed) {
xl_[j] = x_[j] - lb[j];
Expand Down
4 changes: 2 additions & 2 deletions src/ipm/ipx/iterate.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Iterate {
double zl(Int j) const { return zl_[j]; }
double zu(Int j) const { return zu_[j]; }

// Returns const rerefences to the residual vectors
// Returns const references to the residual vectors
// rb = b-AI*x,
// rl = lb-x+xl,
// ru = ub-x-xu,
Expand Down Expand Up @@ -155,7 +155,7 @@ class Iterate {
double presidual() const;
double dresidual() const;

// copmlementarity() returns the sum of the pairwise complementarity
// complementarity() returns the sum of the pairwise complementarity
// products xl[j]*zl[j] and xu[j]*zu[j] from all barrier terms. mu()
// returns the average, mu_min() the minimum and mu_max() the maximum.
double complementarity() const;
Expand Down
2 changes: 1 addition & 1 deletion src/ipm/ipx/lu_factorization.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LuFactorization {
// kLuDependencyTol as absolute pivot tolerance and to
// remove columns from the active submatrix
// immediately when all entries became smaller than
// the abolute pivot tolerance. Need not be supported
// the absolute pivot tolerance. Need not be supported
// by the implementation.
// @L, @U: return the matrix factors with sorted indices. The objects are
// resized as necessary.
Expand Down
2 changes: 1 addition & 1 deletion src/ipm/ipx/lu_update.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LuUpdate {
// kLuDependencyTol as absolute pivot tolerance and to
// remove columns from the active submatrix
// immediately when all entries became smaller than
// the abolute pivot tolerance. Need not be supported
// the absolute pivot tolerance. Need not be supported
// by the implementation.
//
// Factorize() cannot fail other than for out of memory, in which case
Expand Down
2 changes: 1 addition & 1 deletion src/ipm/ipx/sparse_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace ipx {
// have previously been unmarked; they are marked now and newtop
// is returned.
// @marked, @marker Node i is "marked" iff @marked[i] == @marker.
// @work worksapce of size # rows of A.
// @work workspace of size # rows of A.
//
// The code has been copied and adapted from cs_dfs.c, included in the CSPARSE
// package [1].
Expand Down
4 changes: 2 additions & 2 deletions src/lp_data/HighsInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2198,7 +2198,7 @@ void Highs::formIllConditioningLp0(HighsLp& ill_conditioning_lp,
ill_conditioning_matrix.value_.push_back(1.0);
ill_conditioning_matrix.start_.push_back(
HighsInt(ill_conditioning_matrix.index_.size()));
// Subracting x_- with cost 1
// Subtracting x_- with cost 1
ill_conditioning_lp.col_cost_.push_back(1);
ill_conditioning_lp.col_lower_.push_back(0);
ill_conditioning_lp.col_upper_.push_back(kHighsInf);
Expand Down Expand Up @@ -2312,7 +2312,7 @@ void Highs::formIllConditioningLp1(HighsLp& ill_conditioning_lp,
}
assert(ill_conditioning_lp.num_col_ == incumbent_num_row);
if (constraint) {
// Add the identiy matrix for constraint y - u + w = 0
// Add the identity matrix for constraint y - u + w = 0
for (HighsInt iRow = 0; iRow < incumbent_num_row; iRow++) {
ill_conditioning_matrix.index_.push_back(iRow);
ill_conditioning_matrix.value_.push_back(1.0);
Expand Down
2 changes: 1 addition & 1 deletion src/lp_data/HighsSolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ HighsStatus solveUnconstrainedLp(const HighsOptions& options, const HighsLp& lp,

if (lp.num_row_ > 0) {
// Assign primal, dual and basis status for rows, checking for
// infeasiblility
// infeasibility
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
double primal_infeasibility = 0;
double lower = lp.row_lower_[iRow];
Expand Down
Loading
Loading