MatNBSolver.hxx
Go to the documentation of this file.00001
00002
00003 #ifndef CONICBUNDLE_MATNBSOLVER_HXX
00004 #define CONICBUNDLE_MATNBSOLVER_HXX
00005
00014 #include "MatBSolver.hxx"
00015
00016
00017
00018
00019 namespace ConicBundle {
00020
00024
00025 class MatNBSolverData;
00026
00044 class MatrixNBSolver: public MatrixBSolver
00045 {
00046 private:
00047 MatNBSolverData* data_;
00048 MatrixNBSolver ( const CBSolver& );
00049 MatrixNBSolver& operator= ( const CBSolver& );
00050 public:
00051
00053 MatrixNBSolver();
00055 ~MatrixNBSolver();
00056
00057
00060
00064 void clear();
00065
00068 void set_defaults();
00069
00111 int init_problem(int dim,
00112 const CH_Matrix_Classes::Matrix* lbounds=0,
00113 const CH_Matrix_Classes::Matrix* ubounds=0,
00114 const CH_Matrix_Classes::Matrix* costs=0);
00115
00116
00130 int
00131 add_function
00132 ( FunctionObject& function );
00133
00145 int set_lower_bound(int i, double lb);
00146
00158 int set_upper_bound(int i, double ub);
00159
00160
00198 int append_variables(int n_append,
00199 const CH_Matrix_Classes::Matrix* lbounds=0,
00200 const CH_Matrix_Classes::Matrix* ubounds=0,
00201 const CH_Matrix_Classes::Matrix* costs=0);
00202
00234 int delete_variables(const CH_Matrix_Classes::Indexmatrix& del_indices,CH_Matrix_Classes::Indexmatrix& map_to_old);
00235
00263 int reassign_variables(const CH_Matrix_Classes::Indexmatrix& assign_new_from_old);
00264
00266
00267
00270
00318 int
00319 do_descent_step(int maxsteps=0);
00320
00321
00356 int
00357 termination_code()
00358 const;
00359
00367 std::ostream&
00368 print_termination_code(std::ostream& out);
00369
00375 double
00376 get_objval()
00377 const;
00378
00389 int
00390 get_center
00391 ( CH_Matrix_Classes::Matrix& center )
00392 const;
00393
00394
00397 double
00398 get_sgnorm()
00399 const;
00400
00408 int
00409 get_subgradient
00410 ( CH_Matrix_Classes::Matrix& subgradient )
00411 const;
00412
00416 double
00417 get_cutval()
00418 const;
00419
00428 double
00429 get_candidate_value()
00430 const;
00431
00442 int
00443 get_candidate
00444 ( CH_Matrix_Classes::Matrix& center )
00445 const;
00446
00447
00449
00450
00453
00467 int
00468 set_term_relprec
00469 ( const double term_relprec );
00470
00479 int
00480 set_new_center_point
00481 ( const CH_Matrix_Classes::Matrix& center_point );
00482
00483
00487 int
00488 get_function_status
00489 ( const FunctionObject& function )
00490 const;
00491
00499 int
00500 get_approximate_slacks(CH_Matrix_Classes::Matrix &)
00501 const;
00502
00516 int
00517 get_approximate_primal
00518 ( const FunctionObject& function,
00519 PrimalData& primal )
00520 const;
00521
00535 int
00536 get_center_primal
00537 ( const FunctionObject& function,
00538 PrimalData& primal )
00539 const;
00540
00541
00552 int
00553 get_candidate_primal
00554 ( const FunctionObject& function,
00555 PrimalData& primal )
00556 const;
00557
00558
00566 int
00567 set_max_bundlesize
00568 ( const FunctionObject& function, int max_bundlesize );
00569
00577 int
00578 set_max_new_subgradients
00579 ( const FunctionObject& function, int max_new_subgradients );
00580
00588 int
00589 set_bundle_parameters
00590 ( const FunctionObject& function,
00591 const BundleParameters& params );
00592
00609 int
00610 get_bundle_parameters
00611 ( const FunctionObject& function, BundleParameters& params )
00612 const;
00613
00631 int
00632 get_bundle_values
00633 ( const FunctionObject& function, BundleParameters& params )
00634 const;
00635
00651 int reinit_function_model
00652 ( const FunctionObject& function );
00653
00668 int clear_aggregates
00669 ( const FunctionObject& function );
00670
00691 int call_primal_extender
00692 (const FunctionObject& function,
00693 PrimalExtender& primal_extender);
00694
00698 double
00699 get_last_weight()
00700 const;
00701
00722 int
00723 set_next_weight
00724 ( const double weight );
00725
00740 int
00741 set_min_weight
00742 ( const double min_weight );
00743
00757 int
00758 set_max_weight
00759 ( const double max_weight );
00760
00777 int
00778 adjust_multiplier
00779 ( void );
00780
00781
00788 int
00789 set_scaling
00790 ( bool do_scaling );
00791
00807 int
00808 set_scaling
00809 ( const CH_Matrix_Classes::Matrix& scale );
00810
00835 virtual void
00836 set_active_bounds_fixing
00837 ( bool allow_fixing );
00838
00846 void
00847 clear_fail_counts
00848 (void);
00849
00863 void
00864 set_eval_limit
00865 (CH_Matrix_Classes::Integer eval_limit);
00866
00880 void
00881 set_inner_update_limit
00882 (CH_Matrix_Classes::Integer update_limit);
00883
00885
00886
00892 int get_dim() const;
00893
00896 int get_n_functions() const;
00897
00900 int get_n_oracle_calls() const;
00901
00904 int get_n_descent_steps() const;
00905
00908 int get_n_inner_iterations() const;
00909
00912 int get_n_inner_updates() const;
00913
00916 const CH_Matrix_Classes::Matrix& get_lbounds() const;
00917
00920 const CH_Matrix_Classes::Matrix& get_ubounds() const;
00921
00930 const CH_Matrix_Classes::Indexmatrix& get_active_bounds_indicator() const;
00931
00933
00934
00937
00995 void
00996 set_out
00997 (std::ostream* out=0,int print_level=1);
00998
01000 std::ostream& print_line_summary(std::ostream& out) const;
01001
01003
01004 };
01005
01007 }
01008
01009 #endif
01010
01011
01012