#include <dag_delta.h>
Classes | |
class | __check_nodes |
struct | __docompare_nodes |
Public Member Functions | |
dag_delta (const std::string &__a, bool full=false) | |
dag_delta (const std::string &__a, model *__nc, bool full=false) | |
dag_delta (const dag_delta &__d) | |
~dag_delta () | |
dag_delta * | new_copy () const |
void | destroy_copy (delta_base *__d) const |
void | add_new (model *__m) |
void | add_new (model &__m) |
void | remove (const walker &_nn) |
void | remove (const std::vector< walker > &_nn) |
void | unkeep () |
bool | apply (work_node &x, undelta_base *&_u, const delta_id &_did) const |
bool | operator== (const delta_base &_c) const |
bool | operator!= (const delta_base &_c) const |
bool | operator== (const dag_delta &_c) const |
bool | operator!= (const dag_delta &_c) const |
delta | make_delta (const std::string &a) |
const std::string & | get_action () const |
virtual void | convert (work_node &_x, delta_base *&_d) |
virtual bool | apply3 (work_node &_x, const work_node &_y, undelta_base *&_u, const delta_id &_d) const |
Public Attributes | |
counted_ptr< model > | new_constraints |
std::vector< walker > | rm_nodes |
bool | is_full_delta |
Protected Attributes | |
std::string | _action |
Friends | |
class | dag_undelta |
Definition at line 161 of file dag_delta.h.
coco::dag_delta::dag_delta | ( | const std::string & | __a, | |
bool | full = false | |||
) | [inline] |
Constructor setting the action identifier to __a
and the is_full_delta member to full
.
Definition at line 185 of file dag_delta.h.
coco::dag_delta::dag_delta | ( | const std::string & | __a, | |
model * | __nc, | |||
bool | full = false | |||
) | [inline] |
Constructor setting the action identifier to __a
and the is_full_delta member to full
. Furthermore, the new_constraints
member is initialized with __nc
.
Definition at line 193 of file dag_delta.h.
coco::dag_delta::dag_delta | ( | const dag_delta & | __d | ) | [inline] |
Standard Copy Constructor
Definition at line 200 of file dag_delta.h.
coco::dag_delta::~dag_delta | ( | ) | [inline] |
Standard Destructor
Definition at line 211 of file dag_delta.h.
void coco::dag_delta::add_new | ( | model & | __m | ) | [inline] |
This method initializes the new_constraints
member.
Definition at line 233 of file dag_delta.h.
void coco::dag_delta::add_new | ( | model * | __m | ) | [inline] |
This method initializes the new_constraints
member.
Definition at line 228 of file dag_delta.h.
bool coco::dag_delta::apply | ( | work_node & | x, | |
undelta_base *& | _u, | |||
const delta_id & | _did | |||
) | const [virtual] |
Apply the delta with delta_id _d
to work node _x
, hereby changing the bounds as requested.
save node numbers corresponding to the various new things
Reimplemented from coco::delta_base.
Definition at line 110 of file dag_delta.cc.
bool coco::delta_base::apply3 | ( | work_node & | _x, | |
const work_node & | _y, | |||
undelta_base *& | _u, | |||
const delta_id & | _d | |||
) | const [inline, virtual, inherited] |
Apply the delta with delta_id _d
to work node _x
, constructing in the process work_node _y
, without changing _x
. In this process the undo information for this delta is stored in _u
. This method should be overloaded in the specializations of this class for maximal efficiency, but it need not since a standard procedure is available, which uses the work_node copy constructur and the apply
method.
Definition at line 88 of file api_delta.h.
virtual void coco::delta_base::convert | ( | work_node & | _x, | |
delta_base *& | _d | |||
) | [inline, virtual, inherited] |
Convert this delta to a delta which can be stored in _x
, this is e.g. used for all delta version, which are actually stored as annotation changes.
Reimplemented in coco::table_delta.
Definition at line 189 of file api_deltabase.h.
void coco::dag_delta::destroy_copy | ( | delta_base * | __d | ) | const [inline] |
Clone Destructor
Definition at line 225 of file dag_delta.h.
const std::string& coco::delta_base::get_action | ( | ) | const [inline, inherited] |
Retrieve the action information (the delta type) for this delta.
Definition at line 184 of file api_deltabase.h.
delta coco::delta_base::make_delta | ( | const std::string & | a | ) | [inline, inherited] |
Construct a delta from this delta_base with the action a
.
Definition at line 175 of file api_deltabase.h.
dag_delta* coco::dag_delta::new_copy | ( | ) | const [inline, virtual] |
bool coco::dag_delta::operator!= | ( | const dag_delta & | _c | ) | const [inline] |
Definition at line 312 of file dag_delta.h.
bool coco::dag_delta::operator!= | ( | const delta_base & | _c | ) | const [inline] |
Definition at line 305 of file dag_delta.h.
bool coco::dag_delta::operator== | ( | const dag_delta & | _c | ) | const [inline] |
Comparison operators
Definition at line 310 of file dag_delta.h.
bool coco::dag_delta::operator== | ( | const delta_base & | _c | ) | const [inline] |
Comparison operators
Definition at line 302 of file dag_delta.h.
void coco::dag_delta::remove | ( | const std::vector< walker > & | _nn | ) | [inline] |
This method adds the nodes _nn
to the vector of nodes which are to be removed.
Definition at line 242 of file dag_delta.h.
void coco::dag_delta::remove | ( | const walker & | _nn | ) | [inline] |
This method adds another node _nn
to be removed.
Definition at line 239 of file dag_delta.h.
void coco::dag_delta::unkeep | ( | ) | [inline, virtual] |
Free this delta from the responsibility to remove the nodes from the memory upon destruction of the delta.
Reimplemented from coco::delta_base.
Definition at line 247 of file dag_delta.h.
friend class dag_undelta [friend] |
Definition at line 315 of file dag_delta.h.
std::string coco::delta_base::_action [protected, inherited] |
The action (type) of this delta
Definition at line 154 of file api_deltabase.h.
This DAG will be added to the DAG of the work node when applied. The ghost nodes in this DAG are used to overlay the nodes with the same node number in the original DAG.
Definition at line 170 of file dag_delta.h.
std::vector<walker> coco::dag_delta::rm_nodes |
This variable holds the nodes which are to be removed from the work node DAG. Actually, the minimal subgraph generated by the nodes is removed, i.e. the subgraph containing all nodes in rm_nodes and all nodes, which are only connected to them.
Definition at line 176 of file dag_delta.h.