<commit_before>// Adapted with permission from code by <NAME>
// (https://github.com/edrumwri).

#ifndef DRAKE_SOLVERS_MOBYLCP_H_
#define DRAKE_SOLVERS_MOBYLCP_H_

#include <fstream>
#include <Eigen/SparseCore>

#include "drake/drakeOptimization_export.h"

#include "MathematicalProgram.h"

namespace Drake {

class DRAKEOPTIMIZATION_EXPORT MobyLCPSolver
    : public MathematicalProgramSolverInterface {
 public:
  MobyLCPSolver();
  virtual ~MobyLCPSolver() {}
  void SetLoggingEnabled(bool);

  bool SolveLcpFast(const Eigen::MatrixXd& M, const Eigen::VectorXd& q,
                    Eigen::VectorXd* z, double zero_tol = -1.0) const;
  bool SolveLcpFastRegularized(const Eigen::MatrixXd& M,
                               const Eigen::VectorXd& q, Eigen::VectorXd* z,
                               int min_exp = -20, unsigned step_exp = 4,
                               int max_exp = 20, double zero_tol = -1.0) const;
  bool SolveLcpLemke(const Eigen::MatrixXd& M, const Eigen::VectorXd& q,
                     Eigen::VectorXd* z, double piv_tol = -1.0,
                     double zero_tol = -1.0) const;
  bool SolveLcpLemkeRegularized(const Eigen::MatrixXd& M,
                                const Eigen::VectorXd& q, Eigen::VectorXd* z,
                                int min_exp = -20, unsigned step_exp = 1,
                                int max_exp = 1, double piv_tol = -1.0,
                                double zero_tol = -1.0) const;
  bool SolveLcpLemke(const Eigen::SparseMatrix<double>& M,
                     const Eigen::VectorXd& q, Eigen::VectorXd* z,
                     double piv_tol = -1.0, double zero_tol = -1.0) const;
  bool SolveLcpLemkeRegularized(const Eigen::SparseMatrix<double>& M,
                                const Eigen::VectorXd& q, Eigen::VectorXd* z,
                                int min_exp = -20, unsigned step_exp = 4,
                                int max_exp = 20, double piv_tol = -1.0,
                                double zero_tol = -1.0) const;

  virtual bool available() const override { return true; }
  virtual bool Solve(OptimizationProblem& prog) const override;

 private:
  void ClearIndexVectors() const;<commit_msg>All parameters should be named. Fix for cpplint readability/function.<commit_after>// Adapted with permission from code by <NAME>
// (https://github.com/edrumwri).

#ifndef DRAKE_SOLVERS_MOBYLCP_H_
#define DRAKE_SOLVERS_MOBYLCP_H_

#include <fstream>
#include <Eigen/SparseCore>

#include "drake/drakeOptimization_export.h"

#include "MathematicalProgram.h"

namespace Drake {

class DRAKEOPTIMIZATION_EXPORT MobyLCPSolver
    : public MathematicalProgramSolverInterface {
 public:
  MobyLCPSolver();
  virtual ~MobyLCPSolver() {}
  void SetLoggingEnabled(bool enabled);

  bool SolveLcpFast(const Eigen::MatrixXd& M, const Eigen::VectorXd& q,
                    Eigen::VectorXd* z, double zero_tol = -1.0) const;
  bool SolveLcpFastRegularized(const Eigen::MatrixXd& M,
                               const Eigen::VectorXd& q, Eigen::VectorXd* z,
                               int min_exp = -20, unsigned step_exp = 4,
                               int max_exp = 20, double zero_tol = -1.0) const;
  bool SolveLcpLemke(const Eigen::MatrixXd& M, const Eigen::VectorXd& q,
                     Eigen::VectorXd* z, double piv_tol = -1.0,
                     double zero_tol = -1.0) const;
  bool SolveLcpLemkeRegularized(const Eigen::MatrixXd& M,
                                const Eigen::VectorXd& q, Eigen::VectorXd* z,
                                int min_exp = -20, unsigned step_exp = 1,
                                int max_exp = 1, double piv_tol = -1.0,
                                double zero_tol = -1.0) const;
  bool SolveLcpLemke(const Eigen::SparseMatrix<double>& M,
                     const Eigen::VectorXd& q, Eigen::VectorXd* z,
                     double piv_tol = -1.0, double zero_tol = -1.0) const;
  bool SolveLcpLemkeRegularized(const Eigen::SparseMatrix<double>& M,
                                const Eigen::VectorXd& q, Eigen::VectorXd* z,
                                int min_exp = -20, unsigned step_exp = 4,
                                int max_exp = 20, double piv_tol = -1.0,
                                double zero_tol = -1.0) const;

  virtual bool available() const override { return true; }
  virtual bool Solve(OptimizationProblem& prog) const override;

 private:
  void ClearIndexVectors() const;
{'fraction_non_alphanumeric': 0.09569699686239355, 'fraction_numerical': 0.01523980277902286, 'mean_word_length': 2.0673539518900346, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2095991', 'n_tokens_mistral': 1496, 'n_tokens_neox': 1342, 'n_words': 344}