42 #ifndef MATRIX_KKT_FULL_SPACE_RELAXED_H
43 #define MATRIX_KKT_FULL_SPACE_RELAXED_H
45 #include "ConstrainedOptPack_Types.hpp"
46 #include "AbstractLinAlgPack/src/MatrixWithOpFactorized.hpp"
47 #include "AbstractLinAlgPack/src/MatrixConvertToSparseFortranCompatible.hpp"
50 namespace ConstrainedOptPack {
95 :
public MatrixWithOpFactorized
96 ,
public MatrixConvertToSparseFortranCompatible
101 typedef AbstractLinAlgPack::DirectSparseFortranCompatibleSolver
114 {
public:
InvalidMatrixType (
const std::string& what_arg) : std::logic_error(what_arg) {}};
168 void initialize(
const MatrixOp& G,
const MatrixOp& A
178 ,
const DVectorSlice& c, value_type bigM = 1e+10
217 std::ostream&
output(std::ostream& out)
const;
224 ,
const DVectorSlice& vs_rhs2, value_type beta)
const;
231 ,
const DVectorSlice& vs_rhs2)
const;
237 FortranTypes::f_int
num_nonzeros( EExtractRegion extract_region )
const;
241 EExtractRegion extract_region
242 ,
const FortranTypes::f_int len_Aval
243 , FortranTypes::f_dbl_prec Aval[]
244 ,
const FortranTypes::f_int len_Aij
245 , FortranTypes::f_int Arow[]
246 , FortranTypes::f_int Acol[]
247 ,
const FortranTypes::f_int row_offset
248 ,
const FortranTypes::f_int col_offset
259 bool use_relaxation_;
265 const MatrixConvertToSparseFortranCompatible
269 const MatrixConvertToSparseFortranCompatible
277 void assert_matrices_set()
const;
280 void assert_initialized()
const;
285 void validate_and_set_matrices(
const MatrixOp& G,
const MatrixOp& A );
291 #endif // MATRIX_KKT_FULL_SPACE_RELAXED_H
void set_uninitialized()
Set the matrix to uninitialized.
void coor_extract_nonzeros(EExtractRegion extract_region, const FortranTypes::f_int len_Aval, FortranTypes::f_dbl_prec Aval[], const FortranTypes::f_int len_Aij, FortranTypes::f_int Arow[], FortranTypes::f_int Acol[], const FortranTypes::f_int row_offset, const FortranTypes::f_int col_offset) const
STANDARD_COMPOSITION_MEMBERS(DirectSparseFortranCompatibleSolver, direct_solver)
<<std comp>="">> members for the direct sparse linear solver
FortranTypes::f_int num_nonzeros(EExtractRegion extract_region) const
void Vp_StMtV(DVectorSlice *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2, value_type beta) const
(2) vs_lhs = alpha * op(M_rhs1) * vs_rhs2 + beta * vs_lhs (BLAS xGEMV)
void release_memory()
Clear all allocated storage.
MatrixOp & operator=(const MatrixOp &m)
MatrixKKTFullSpaceRelaxed(const direct_solver_ptr_t &direct_solver=0)
AbstractLinAlgPack::DirectSparseFortranCompatibleSolver DirectSparseFortranCompatibleSolver
void V_InvMtV(DVectorSlice *v_lhs, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2) const
(1) v_lhs = inv(op(M_rhs1)) * vs_rhs2
void initialize(const MatrixOp &G, const MatrixOp &A, std::ostream *out=0, EPrintMoreOrLess print_what=PRINT_LESS, ERunTests test_what=NO_TESTS)
Initialize the nonrelaxed matrix.
void initialize_relaxed(const MatrixOp &G, const MatrixOp &A, const DVectorSlice &c, value_type bigM=1e+10, std::ostream *out=0, EPrintMoreOrLess print_what=PRINT_LESS, ERunTests test_what=NO_TESTS)
Initialize the relaxed matrix.
std::ostream & output(std::ostream &out) const
Implementation of a KKT matrix factorized in the full space.