22 #ifdef QPMAD_USE_HOUSEHOLDER 29 template <
class t_MatrixType>
36 QLi_aka_J.triangularView<Eigen::Lower>().setZero();
41 #ifdef QPMAD_USE_HOUSEHOLDER 48 #ifdef QPMAD_USE_HOUSEHOLDER
53 const double tolerance)
55 #ifdef QPMAD_USE_HOUSEHOLDER 61 R(R_col, R_col) = beta;
72 return ( std::abs(beta) > tolerance );
80 for (j = i-1; (0.0 ==
R(j, R_col)) && (j > R_col); --j)
96 return ( std::abs(
R(R_col, R_col)) > tolerance );
105 for (
MatrixIndex i = R_col_index + 1; i < R_cols; ++i)
112 R.col(i-1).segment(0, i) =
R.col(i).segment(0, i);
115 R.col(R_cols-1) =
R.col(R_cols);
119 template<
class t_VectorType>
125 R.col(active_set_size) =
QLi_aka_J.row(simple_bound_index).transpose();
131 template<
class t_VectorType,
132 class t_RowVectorType>
134 const t_RowVectorType & ctr,
138 R.col(active_set_size).noalias() =
QLi_aka_J.transpose() * ctr.transpose();
144 template<
class t_VectorType0>
153 template<
class t_VectorType,
157 const t_MatrixType & A,
180 R.col(active_set.
size_).noalias() =
185 R.col(active_set.
size_).noalias() =
195 template<
class t_VectorType0,
198 t_VectorType1 & dual_step_direction,
206 template<
class t_VectorType0,
209 t_VectorType1 & dual_step_direction,
218 template<
class t_VectorType>
222 step_direction.noalias() =
228 template<
class t_VectorType>
237 R.col(active_set.
size_).segment(
Represents Givens rotation.
void applyColumnWise(t_MatrixType &M, const int start, const int end, const int column_1, const int column_2) const
MatrixIndex length_nonzero_head_d_
MatrixIndex general_constraint_index_
void computeDualStepDirection(t_VectorType &step_direction, const ActiveSet &active_set)
MatrixIndex num_inequalities_
void computePrimalStepDirection(t_VectorType &step_direction, const MatrixIndex active_set_size)
void applyRowWise(t_MatrixType &M, const int start, const int end, const int row_1, const int row_2) const
void downdate(const MatrixIndex R_col_index, const MatrixIndex R_cols)
void updateStepsAfterPartialStep(t_VectorType0 &primal_step_direction, t_VectorType1 &dual_step_direction, const ActiveSet &active_set)
void computeEqualityPrimalStep(t_VectorType &step_direction, const t_RowVectorType &ctr, const MatrixIndex active_set_size)
static void compute(t_OutputMatrixType &U_inverse, const t_InputMatrixType &L)
void updateStepsAfterPureDualStep(t_VectorType0 &primal_step_direction, t_VectorType1 &dual_step_direction, const ActiveSet &active_set)
Type computeAndApply(t_Scalar &a, t_Scalar &b, const t_Scalar eps)
bool update(const MatrixIndex R_col, const bool is_simple, const double tolerance)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > QPMatrix
MatrixIndex num_equalities_
void initialize(const t_MatrixType &H, const MatrixIndex primal_size)
void computeEqualityPrimalStep(t_VectorType &step_direction, const MatrixIndex simple_bound_index, const MatrixIndex active_set_size)
void computeInequalityDualStep(t_VectorType &dual_step_direction, const ChosenConstraint &chosen_ctr, const t_MatrixType &A, const ActiveSet &active_set)
void computeInequalityPrimalStep(t_VectorType0 &primal_step_direction, const ActiveSet &active_set)