4 #ifndef CONICBUNDLE_PSCAffineMODIFICATION_HXX 5 #define CONICBUNDLE_PSCAffineMODIFICATION_HXX 19 #include "ModificationBase.hxx" 188 const CBout* cb=0,
int incr=0);
400 {
return ((var_append_dim>0)||(var_map_to_old));}
403 {
return ((block_append_dim.
dim()>0)||(block_map_to_old));}
463 {
return reset_primal;}
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
Base class for informing oracles (or the solver) about dynamic changes in the number and sorting of t...
Definition: CBSolver.hxx:544
CH_Matrix_Classes::Integer var_newdim
number (or dimension) of variables after all listed modifications have been applied ...
Definition: PSCAffineModification.hxx:116
const SparseCoeffmatMatrix & get_offset_append() const
returns null if nothing or default values have to be appended, otherwise it points to a matrix whose ...
Definition: PSCAffineModification.hxx:459
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 o...
int add_append_blocks(const CH_Matrix_Classes::Indexmatrix &append_dim, const SparseCoeffmatMatrix *append_offsets, const SparseCoeffmatMatrix *append_blocks)
append information on new rows at the respective ends
SparseCoeffmatMatrix var_append
columns to be appended for these new variables
Definition: PSCAffineModification.hxx:122
CH_Matrix_Classes::Indexmatrix * var_map_to_old
the variables are rearranged so that the new index i had previously (after additions and before delet...
Definition: PSCAffineModification.hxx:127
CH_Matrix_Classes::Integer var_olddim
initial number (or dimension) of variables
Definition: PSCAffineModification.hxx:114
bool new_variables_are_zero(const CH_Matrix_Classes::Matrix &newpoint, const SparseCoeffmatMatrix &newmat) const
returns true if for all indices of new variables the entries in newpoint (must be a vector of length ...
int incorporate(const OracleModification &m)
add the modification specified in m on top of the modifications collected so far
PSCPrimal * generating_primal
primal to reset to
Definition: PSCAffineModification.hxx:168
bool deleted_variables_are_zero(const CH_Matrix_Classes::Matrix &oldpoint, const SparseCoeffmatMatrix &oldmat) const
returns true if all entries deleted in oldpoint (must be a vector of length old_vardim()) or the corr...
int add_reassign_blocks(const CH_Matrix_Classes::Indexmatrix &map_to_old)
reassign the current row indices (with modifications) as specified by map_to_old
CH_Matrix_Classes::Indexmatrix * var_del_ind
indices of variables that will be deleted by the reassignment of indices by map_to_old after all addi...
Definition: PSCAffineModification.hxx:125
const SparseCoeffmatMatrix & get_block_append() const
returns null if nothing or default values have to be appended, otherwise it points to a sparse matrix...
Definition: PSCAffineModification.hxx:456
class for collecting and organizing a sequence of changes to block diagonal symmetric affine matrix f...
Definition: PSCAffineModification.hxx:95
Matrix class for integral values of type Integer
Definition: indexmat.hxx:195
int add_append_vars(CH_Matrix_Classes::Integer append_dim, const SparseCoeffmatMatrix *append_cols)
append information on new variables at the respective ends
CH_Matrix_Classes::Indexmatrix * block_new_ind
in the end the appended new rows have these positions
Definition: PSCAffineModification.hxx:157
CH_Matrix_Classes::Integer appended_vardim() const
returns the number of variables that are appended (due to later reassignmentds they may no longer be ...
Definition: PSCAffineModification.hxx:418
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
const CH_Matrix_Classes::Indexmatrix & appended_blockdim() const
returns the number of rows that are appended (due to later reassignments they may no longer be locate...
Definition: PSCAffineModification.hxx:425
PSCAffineModification(CH_Matrix_Classes::Integer var_olddim, const CH_Matrix_Classes::Indexmatrix &block_olddim, const CBout *cb=0, int incr=0)
calls clear() with these parameters
CH_Matrix_Classes::Integer new_vardim() const
returns the number of variables once all stored modifications have been performed ...
Definition: PSCAffineModification.hxx:416
bool block_modifications() const
returns true if some modifications are performed on the block structure
Definition: PSCAffineModification.hxx:402
bool get_skip_extension() const
returns true if the generating primal is to be replaced by the one stored here
Definition: PSCAffineModification.hxx:469
CH_Matrix_Classes::Integer var_append_dim
number of variables appended
Definition: PSCAffineModification.hxx:119
const CH_Matrix_Classes::Indexmatrix * deleted_block_indices() const
returns null if there were no deletions, otherwise the Indexmatrix pointed to is a vector holding the...
Definition: PSCAffineModification.hxx:445
basic routines for the base classes for reorganizing maps
Definition: ModificationBase.hxx:28
bool get_reset_primal() const
returns true if the generating primal is to be replaced by the one stored here
Definition: PSCAffineModification.hxx:462
int add_reset_generating_primal(PSCPrimal *new_generating_primal)
replace the current generating primal by new_generating_primal (on the heap, will be deleted here)...
SparseCoeffmatMatrix block_append
rows to be appended;
Definition: PSCAffineModification.hxx:151
conic bundle method solver for sum of convex functions. See the ConicBundle_Manual for a quick introd...
Definition: CBSolver.hxx:22
virtual 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 fo...
Definition: PSCAffineModification.hxx:518
base class for uniform use of WARNINGS and ERRORS (at some point in time)
Definition: CBout.hxx:30
stores/organizes the CoeffmatPointer pointers to Coeffmat matrices with the purpose of describing the...
Definition: SparseCoeffmatMatrix.hxx:50
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-...
Definition: PSCAffineModification.hxx:429
int add_delete_blocks(const CH_Matrix_Classes::Indexmatrix &del_ind, CH_Matrix_Classes::Indexmatrix &map_to_old)
delete the rows indexed by the vector del_ind and return the index changes of the others in a vector ...
Header declaring the classes ConicBundle::CBSolver, ConicBundle::FunctionOracle and ConicBundle::Prim...
int add_append_variables(int append_dim)
append append_dim further variables at the end of the argument vector (without specifying their effec...
Definition: PSCAffineModification.hxx:514
bool append_to_old() const
returns true if this only contains appending operations and incorporating this is done with respect t...
Definition: PSCAffineModification.hxx:389
void set_cbout(const CBout *out, int incr=-1)
see CBout::set_cbout
Definition: PSCAffineModification.hxx:531
Header declaring the output class CBout.
int apply_to_PSCAffine(SparseCoeffmatMatrix *offset, SparseCoeffmatMatrix *matrix) const
carry out the collected modifications on the data describing the PSCAffineFunction ...
const CH_Matrix_Classes::Indexmatrix & new_blockdim() const
returns the number of rows once all stored modifications have been performed
Definition: PSCAffineModification.hxx:423
virtual void set_out(std::ostream *out=0, int print_level=1)
Specifies the output level (out==NULL: no output at all, out!=NULL and level=0: errors and warnings...
SparseCoeffmatMatrix offset_append
offset blocks to be appended;
Definition: PSCAffineModification.hxx:149
int add_delete_vars(const CH_Matrix_Classes::Indexmatrix &del_ind, CH_Matrix_Classes::Indexmatrix &map_to_old)
delete the variables indexed by the vector del_ind and return the index changes of the others in a ve...
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 whos...
Definition: PSCAffineModification.hxx:510
Matrix class for real values of type Real
Definition: matrix.hxx:74
bool append_only
if true, only appending operations are allowed and incorporating this has a different effect ...
Definition: PSCAffineModification.hxx:100
const CH_Matrix_Classes::Indexmatrix * map_to_old_blocks() const
returns null if there are index changes, otherwise the Indexmatrix pointed to is a vector whose i-th ...
Definition: PSCAffineModification.hxx:441
std::ostream * out
not output at all if out==0, otherwise use this output stream
Definition: CBout.hxx:33
CH_Matrix_Classes::Indexmatrix block_newdim
number of blocks and their dimension after all listed modifications have been applied ...
Definition: PSCAffineModification.hxx:144
CH_Matrix_Classes::Indexmatrix block_append_dim
number of blocks appended with their dimension
Definition: PSCAffineModification.hxx:147
const CH_Matrix_Classes::Indexmatrix & old_blockdim() const
returns the number of rows before modification (given on initialization)
Definition: PSCAffineModification.hxx:421
int print_level
nonnegative level of output, 0 should mean WARNINGS and ERRORS only, 1 should represent normal output...
Definition: CBout.hxx:37
int clear(CH_Matrix_Classes::Integer var_olddim, const CH_Matrix_Classes::Indexmatrix &block_olddim)
resets all variables so that the object to be modified has starting size var_olddim (number of variab...
CH_Matrix_Classes::Indexmatrix * var_new_ind
in the end the appended new variables have these positions
Definition: PSCAffineModification.hxx:129
Integer * get_store()
returns the current address of the internal value array; use cautiously, do not use delete! ...
Definition: indexmat.hxx:427
Header declaring the classes ConicBundle::SparseCoeffmatMatrix (needed for ConicBundle::PSCAffineFunc...
int set_skip_extension(bool skip)
if this time no extension is possible for newly added variables with the availabel generating primal...
CH_Matrix_Classes::Indexmatrix block_olddim
initial number of blocks and their dimension
Definition: PSCAffineModification.hxx:142
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-...
Definition: PSCAffineModification.hxx:489
const CH_Matrix_Classes::Indexmatrix * new_block_indices() const
returns null if no rows were added, otherwise the Indexmatrix pointed ato is a vector holding the new...
Definition: PSCAffineModification.hxx:449
int get_new_vardim() const
returns the number of variables once all stored modifications have been performed ...
Definition: PSCAffineModification.hxx:484
const CH_Matrix_Classes::Indexmatrix * new_var_indices() const
returns null if no variables were added, otherwise the Indexmatrix pointed to is a vector holding the...
Definition: PSCAffineModification.hxx:437
const SparseCoeffmatMatrix & get_var_append() const
returns null if nothing or default values have to be appended, otherwise it points to a sparse matrix...
Definition: PSCAffineModification.hxx:453
CH_Matrix_Classes::Integer old_vardim() const
returns the number of variables before modification (given on initialization)
Definition: PSCAffineModification.hxx:414
void dim(Integer &_nr, Integer &_nc) const
returns the number of rows in _nr and the number of columns in _nc
Definition: indexmat.hxx:315
bool variable_modifications() const
returns true if some modifications are performed on the block structure
Definition: PSCAffineModification.hxx:399
int get_appended_vardim() const
returns the number of variables that are appended (due to later reassignmentds they may no longer be ...
Definition: PSCAffineModification.hxx:486
bool skip_extension
if set to true, no extension is performed on newly added variables
Definition: PSCAffineModification.hxx:170
void set_out(std::ostream *out=0, int print_level=1)
see CBout::set_out
Definition: PSCAffineModification.hxx:535
int get_old_vardim() const
returns the number of variables before modification
Definition: PSCAffineModification.hxx:482
const PSCPrimal * get_generating_primal() const
returns the generating primal pointer stored here (may be NULL); if get_reset_primal() is true...
Definition: PSCAffineModification.hxx:465
bool no_modification() const
returns true if no modifications need to be executed
CH_Matrix_Classes::Indexmatrix * block_map_to_old
the rows are rearranged so that the new index i had previously (after additions and before deletions)...
Definition: PSCAffineModification.hxx:155
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...
Definition: PSCAffineModification.hxx:433
PSCPrimal is the corresponding positive semidefinite object for PSCOracle like PrimalMatrix for a Mat...
Definition: PSCPrimal.hxx:46
int add_reassign_vars(const CH_Matrix_Classes::Indexmatrix &map_to_old)
reassign the current variable indices (with modifications) as specified by map_to_old ...
virtual void set_cbout(const CBout *cb, int incr=-1)
Specifies the output level relative to the given CBout class.
CH_Matrix_Classes::Indexmatrix * block_del_ind
indices of rows that will be deleted by the reassignment of indices by map_to_old after all additions...
Definition: PSCAffineModification.hxx:153