ConicBundle
List of all members

Collects modifications for the linearly constrained LPGroundset for appending, deleting or reassigning variables (with bounds and starting values) and constraints (with bounds) More...

#include <LPGroundsetModification.hxx>

Inheritance diagram for ConicBundle::LPGroundsetModification:
ConicBundle::GroundsetModification ConicBundle::CBout ConicBundle::OracleModification

Public Member Functions

Constructors and initialization
void clear (CH_Matrix_Classes::Integer var_olddim, CH_Matrix_Classes::Integer row_olddim)
 reset modifications to an unmodified object currently having var_olddim variables and row_olddim constraints, calls Modification::clear
 
 LPGroundsetModification (CH_Matrix_Classes::Integer var_olddim, CH_Matrix_Classes::Integer row_olddim, const CBout *cbo=0, int incr=-1)
 calls clear(var_olddim,row_olddim)
 
virtual ~LPGroundsetModification ()
 
Routines for adding modifications
int add_set_lb (CH_Matrix_Classes::Integer ind, CH_Matrix_Classes::Real lb)
 set the lower bound on variable with index ind to value lb More...
 
int add_set_ub (CH_Matrix_Classes::Integer ind, CH_Matrix_Classes::Real ub)
 set the upper bound on variable with index ind to value ub More...
 
int add_append_vars (CH_Matrix_Classes::Integer append_dim, const CH_Matrix_Classes::Matrix *append_lb, const CH_Matrix_Classes::Matrix *append_ub, const CH_Matrix_Classes::Sparsemat *append_cols, const CH_Matrix_Classes::Matrix *start_val, const CH_Matrix_Classes::Matrix *append_costs)
 append append_dim new variables with lower bounds append_lb (NULL: default value) and upper bounds append_ub (NULL: default value), corresponding columns append_cols (NULL: default value) and start_val as initial value (NULL: default value) by calling Modification::add_append_vars
 
int add_set_rhslb (CH_Matrix_Classes::Integer ind, CH_Matrix_Classes::Real rhslb)
 set the lower bound on row right hand side with index ind to value rhslb More...
 
int add_set_rhsub (CH_Matrix_Classes::Integer ind, CH_Matrix_Classes::Real rhsub)
 set the upper bound on row right hand side with index ind to value rhsub More...
 
int add_append_rows (CH_Matrix_Classes::Integer append_dim, const CH_Matrix_Classes::Sparsemat *append_rows, const CH_Matrix_Classes::Matrix *append_rhslb, const CH_Matrix_Classes::Matrix *append_rhsub)
 append append_dim new rows as in append_rows (if NULL, use default value) with lower bound append_rhslb (if NULL use default) and upper bound append_rhsub (if NULL use default), calls Modification::add_append_rows
 
int incorporate (const OracleModification &m)
 
OracleModificationnew_initial_oraclemodification (int old_var_dim) const
 returns a new object on the heap, that allows to incorporate this but starts off from a function whose input argument dimension is old_var_dim
 
Routines for applying the collected modifications
int apply_to_bounds (CH_Matrix_Classes::Matrix &lb, CH_Matrix_Classes::Matrix &ub) const
 carry out the collected modifications on the given vectors of lower and upper bounds on the variables by calling Modification::apply_to_vars
 
int apply_to_rows (CH_Matrix_Classes::Sparsemat &rows, CH_Matrix_Classes::Matrix &rhslb, CH_Matrix_Classes::Matrix &rhsub) const
 carry out the collected modification on the constraint matrix and the corresponding lower and upper bounds by calling Modification::apply_to_rows
 
Routines for retrieving the detailed collected modifications
CH_Matrix_Classes::Integer old_rowdim () const
 returns the number of rows before modification (given on initialization)
 
CH_Matrix_Classes::Integer new_rowdim () const
 returns the number of rows once all stored modifications have been performed
 
CH_Matrix_Classes::Integer appended_rowdim () const
 returns the number of rows that are appended (due to later reassignments they may no longer be located at the end)
 
- Public Member Functions inherited from ConicBundle::GroundsetModification
 GroundsetModification (CH_Matrix_Classes::Integer var_olddim=0, const CBout *cbo=0, int incr=-1)
 constructor, calls modification constructor
 
void clear (CH_Matrix_Classes::Integer var_olddim)
 reset modifications to an unmodified object currently having var_olddim variables, calls Modification::clear
 
virtual ~GroundsetModification ()
 
int add_append_vars (CH_Matrix_Classes::Integer append_dim, const CH_Matrix_Classes::Matrix *start_val=0, const CH_Matrix_Classes::Matrix *costs=0)
 append append_dim new variables with start_val as initial values (if NULL, use default value), calls Modification::add_append_vars
 
int add_reassign_vars (const CH_Matrix_Classes::Indexmatrix &map_to_old)
 reassign the variables as given in map_to_old, calls Modification::add_reassign_vars
 
int add_delete_vars (const CH_Matrix_Classes::Indexmatrix &del_ind, CH_Matrix_Classes::Indexmatrix &map_to_old)
 delete the variables indexed by del_ind; for each new index map_to_old returns the old one; calls Modification::add_delete_vars
 
int add_offset (CH_Matrix_Classes::Real delta)
 add to the current offset the value delta
 
int apply_to_vars (CH_Matrix_Classes::Matrix &vars) const
 carry out the collected modifications on the given vector by calling Modification::apply_to_vars
 
int apply_to_costs (CH_Matrix_Classes::Matrix &costs, CH_Matrix_Classes::Real &in_offset) const
 carry out the collected modifications on the given vector by calling Modification::apply_to_vars
 
bool no_modification () const
 returns true if no modifications need to be executed except possibly an offset change for the ground set minorant
 
int set_append_to_old (bool append_only)
 if set to true, no deletions/reassignments may be present or specified in the future, only appensions are allowed
 
bool append_to_old () const
 returns true if this only contains appending operations and incorporating this is done with respect to the old dimension
 
bool no_additions_or_deletions_in_vars () const
 returns true if no variables were added or deleted (allows permutations), false otherwise
 
bool deleted_variables_are_zero (const CH_Matrix_Classes::Matrix &oldpoint) const
 returns true if all entries deleted in oldpoint (must be a vector of length old_vardim()) are 0, false otherwise
 
bool new_variables_are_zero (const CH_Matrix_Classes::Matrix &newpoint) const
 returns true if all entries in newpoint (must be a vector of length new_vardim()) that correspond to new variables have value 0 and false otherwise
 
bool mapped_variables_are_equal (const CH_Matrix_Classes::Matrix &newpoint, const CH_Matrix_Classes::Matrix &oldpoint) const
 returns true if the values in newpoint (must be a vector of length new_vardim()) that correspond to old variables match the old values stored in oldpoint (must be a vector of length old_vardim()) and false otherwise
 
int get_old_vardim () const
 returns the number of variables before modification
 
int get_new_vardim () const
 returns the number of variables once all stored modifications have been performed
 
int get_appended_vardim () const
 returns the number of variables that are appended (due to later reassignmentds they may no longer be located at the end)
 
const int * get_map_to_old_variables () const
 returns null if there are no index changes, otherwise the Indexmatrix pointed to is a vector whose i-th entry holds the old index of the new i-th variable (injective!), index values exceeding old_vardim() refer to newly appended variables
 
CH_Matrix_Classes::Real get_add_offset () const
 returns the change in the offste value of the groundset minorant
 
const CH_Matrix_Classes::Matrixget_append_costs () const
 returns the change in the offste value of the groundset minorant
 
int add_append_variables (int append_dim)
 append append_dim further variables at the end of the argument vector (without specifying their effect, they may e.g. be ignored by the function)
 
int add_reassign_variables (int new_dim, const int *map_to_old_indices)
 reorder and resize the variables as given by the first new_dim entries of map_to_old_indices; each former index may appear at most once in this list, so new_dim < get_new_vardim()
 
CH_Matrix_Classes::Integer old_vardim () const
 returns the number of variables before modification (given on initialization)
 
CH_Matrix_Classes::Integer new_vardim () const
 returns the number of variables once all stored modifications have been performed
 
CH_Matrix_Classes::Integer appended_vardim () const
 returns the number of variables that are appended (due to later reassignmentds they may no longer be located at the end)
 
const CH_Matrix_Classes::Indexmatrixmap_to_old_variables () const
 returns null if there are no index changes, otherwise the Indexmatrix pointed to is a vector whose i-th entry holds the old index of the new i-th variable (injective!), index values exceeding old_vardim() refer to newly appended variables
 
const CH_Matrix_Classes::Indexmatrixdeleted_var_indices () const
 returns null if there were no deletions, otherwise the Indexmatrix pointed to is a vector holding the deleted old variable indices in increasing order
 
const CH_Matrix_Classes::Indexmatrixnew_var_indices () const
 returns null if no variables were added, otherwise the Indexmatrix pointed ato is a vector holding the new indices of the new variables in increasing order
 
void set_out (std::ostream *out=0, int print_level=1)
 see CBout::set_out
 
void set_cbout (const CBout *cb=0, int incr=-1)
 see CBout::set_out
 
- Public Member Functions inherited from ConicBundle::CBout
void clear_cbout ()
 reset to default settings (out=0,print_level=1)
 
 CBout (const CBout *cb=0, int incr=-1)
 calls set_cbout
 
 CBout (std::ostream *outp, int pl=1)
 initialize correspondingly
 
 CBout (const CBout &cb, int incr=0)
 copy constructor
 
virtual bool cb_out (int pl=-1) const
 Returns true if out!=0 and (pl<print_level), pl<0 should be used for WARNINGS and ERRORS only, pl==0 for usual output.
 
std::ostream & get_out () const
 If cb_out() returned true, this returns the output stream, but it will abort if called with out==0.
 
std::ostream * get_out_ptr () const
 returns the pointer to the output stream
 
int get_print_level () const
 returns the print_level
 
virtual int mfile_data (std::ostream &out) const
 writes problem data to the given outstream
 

Additional Inherited Members

- Protected Attributes inherited from ConicBundle::GroundsetModification
Modification mdf
 this class provides a restricted interface to this Modification instance where all modifications are organized and stored
 
CH_Matrix_Classes::Real offset
 specifies which value should be added to the offset of the groundset objective
 

Detailed Description

Collects modifications for the linearly constrained LPGroundset for appending, deleting or reassigning variables (with bounds and starting values) and constraints (with bounds)

This class is implemented by restricting the possibilities of ConicBundle::Modification to the operations involving variables, so all routines simply call those of Modification. See the description there for usage and default values.

The class is derived from GroundsetModification which only describes changes of variables. If this class is viewed as a GroundsetModification, it also only reveals the effects on the variables.

Member Function Documentation

◆ add_set_lb()

int ConicBundle::LPGroundsetModification::add_set_lb ( CH_Matrix_Classes::Integer  ind,
CH_Matrix_Classes::Real  lb 
)
inline

set the lower bound on variable with index ind to value lb

If value lb exceeds CB_plus_infinity or the index is out of range, the return value is 1 and no changes are carried out, otherwise it returns 0.

References ConicBundle::Modification::add_set_lb(), and ConicBundle::GroundsetModification::mdf.

◆ add_set_rhslb()

int ConicBundle::LPGroundsetModification::add_set_rhslb ( CH_Matrix_Classes::Integer  ind,
CH_Matrix_Classes::Real  rhslb 
)
inline

set the lower bound on row right hand side with index ind to value rhslb

If value rhslb exceeds CB_plus_infinity or the index is out of range, the return value is 1 and no changes are carried out, otherwise it returns 0.

References ConicBundle::Modification::add_set_rhslb(), and ConicBundle::GroundsetModification::mdf.

◆ add_set_rhsub()

int ConicBundle::LPGroundsetModification::add_set_rhsub ( CH_Matrix_Classes::Integer  ind,
CH_Matrix_Classes::Real  rhsub 
)
inline

set the upper bound on row right hand side with index ind to value rhsub

If value rhsub is below CB_minus_infinity or the index is out of range, the return value is 1 and no changes are carried out, otherwise it returns 0.

References ConicBundle::Modification::add_set_rhslb(), and ConicBundle::GroundsetModification::mdf.

◆ add_set_ub()

int ConicBundle::LPGroundsetModification::add_set_ub ( CH_Matrix_Classes::Integer  ind,
CH_Matrix_Classes::Real  ub 
)
inline

set the upper bound on variable with index ind to value ub

If value ub is below CB_minus_infinity or the index is out of range, the return value is 1 and no changes are carried out, otherwise it returns 0.

References ConicBundle::Modification::add_set_ub(), and ConicBundle::GroundsetModification::mdf.

◆ incorporate()

int ConicBundle::LPGroundsetModification::incorporate ( const OracleModification m)
inlinevirtual

The documentation for this class was generated from the following file: