ConicBundle
|
Collects modifications for SOCSupportFunction for appending, deleting or reassigning variables. More...
#include <SOCSupportModification.hxx>
Public Member Functions | |
Constructors and initialization | |
SOCSupportModification (CH_Matrix_Classes::Integer var_olddim=0, const CBout *cb=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 | ~SOCSupportModification () |
Routines for adding modifications | |
int | add_append_vars (CH_Matrix_Classes::Integer append_dim) |
append append_dim new variables to the box function | |
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 | |
Routines for querying properties of the collected modifications | |
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 | |
Routines implementing the abstract OracleModifcation messages | |
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 | |
int | incorporate (const OracleModification &m) |
incorporate the OracleModification m (it should only contain variable changes, but this is not checked!) into this one; calls Modification::incorporate | |
OracleModification * | new_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 | |
int | add_append_variables (int append_dim) |
append append_dim further variables at the end of the argument vector (without effect on the box function, i.e., lower and upper bounds are set to 0) | |
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() | |
Routines for retrieving the detailed collected modifications | |
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::Indexmatrix * | 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 | |
const CH_Matrix_Classes::Indexmatrix * | deleted_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::Indexmatrix * | new_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 | |
Output settings | |
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 | |
Protected Attributes | |
Modification | mdf |
this class provides a restricted interface to this Modification instance where all modifications are organized and stored | |
Collects modifications for SOCSupportFunction for appending, deleting or reassigning variables.
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.