13 BCP_indexed_pricing_list::swap(BCP_indexed_pricing_list&
x) {
14 std::swap(_pr_status, x._pr_status);
15 std::swap(_storage, x._storage);
16 _del_pos.swap(x._del_pos);
17 _indices.swap(x._indices);
21 BCP_indexed_pricing_list::update(
const BCP_indexed_pricing_list& change) {
22 switch (change.get_storage()){
32 BCP_indexed_pricing_list::update() : Bad storage.\n");
34 _indices.erase_by_index(change._del_pos);
35 _indices.append(change._indices);
39 BCP_indexed_pricing_list::update() : unrecognized change list storage.\n");
43 BCP_indexed_pricing_list*
44 BCP_indexed_pricing_list::
45 as_change(
const BCP_indexed_pricing_list& old_list)
const
51 BCP_indexed_pricing_list::as_change() : Bad storage.\n");
52 BCP_indexed_pricing_list* change =
new BCP_indexed_pricing_list;
58 ch_del.
reserve(old_list._indices.size());
60 for (pos = 0; oldi != lastoldi && newi != lastnewi; ++oldi, ++
pos) {
68 for ( ; oldi != lastoldi; ++oldi, ++
pos)
71 change->_indices.insert(change->_indices.end(), newi, lastnewi);
78 BCP_indexed_pricing_list::pack_size()
const {
79 return sizeof(_pr_status) +
sizeof(_storage) + 2 *
sizeof(
int) +
80 sizeof(
int) * (_del_pos.size() + _indices.size());
84 BCP_indexed_pricing_list::pack(
BCP_buffer& buf)
const {
86 if (_pr_status & BCP_PriceIndexedVars){
94 BCP_indexed_pricing_list::unpack(
BCP_buffer& buf) {
96 if (_pr_status & BCP_PriceIndexedVars){
BCP_buffer & pack(const T &value)
Pack a single object of type T.
BCP_buffer & unpack(T &value)
Unpack a single object of type T.
pos
position where the operator should be printed when printing the expression
iterator begin()
Return an iterator to the beginning of the object.
void reserve(const size_t n)
Reallocate the object to make space for n entries.
The data stored is an explicit listing of values.
The data stored is with respect to the same kind of data in the parent of the search tree node...
Currently there isn't any error handling in BCP.
iterator end()
Return an iterator to the end of the object.
The class BCP_vec serves the same purpose as the vector class in the standard template library...
This class describes the message buffer used for all processes of BCP.
void unchecked_push_back(const_reference x)
Append x to the end of the vector.
void fint fint fint real fint real * x