coin-Bcp
Classes | Functions
BCP_vector.hpp File Reference
#include <memory>
#include <cstddef>
#include <cstring>
#include <algorithm>
#include "BCP_vector_sanity.hpp"
#include "BCP_error.hpp"
#include "BCP_vector_bool.hpp"
#include "BCP_vector_char.hpp"
#include "BCP_vector_short.hpp"
#include "BCP_vector_int.hpp"
#include "BCP_vector_double.hpp"
#include "BCP_vector_general.hpp"
Include dependency graph for BCP_vector.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BCP_vec< T >
 The class BCP_vec serves the same purpose as the vector class in the standard template library. More...
 

Functions

template<class T >
bool operator== (const BCP_vec< T > &x, const BCP_vec< T > &y)
 
template<class T >
bool operator< (BCP_vec< T > &x, BCP_vec< T > &y)
 
template<class T >
void purge_ptr_vector (BCP_vec< T * > &pvec, typename BCP_vec< T * >::iterator first, typename BCP_vec< T * >::iterator last)
 This function purges the entries [first,last) from the vector of pointers pvec. More...
 
template<class T >
void purge_ptr_vector (BCP_vec< T * > &pvec)
 This function purges all the entries from the vector of pointers pvec. More...
 
template<class T >
void purge_ptr_vector_by_index (BCP_vec< T * > &pvec, typename BCP_vec< int >::const_iterator first, typename BCP_vec< int >::const_iterator last)
 This function purges the entries indexed by [first,last) from the vector of pointers pvec. More...
 
template<class T >
void keep_ptr_vector_by_index (BCP_vec< T * > &pvec, typename BCP_vec< int >::const_iterator first, typename BCP_vec< int >::const_iterator last)
 This function keeps only the entries indexed by [first,last) from the vector of pointers pvec. More...
 

Function Documentation

template<class T >
bool operator== ( const BCP_vec< T > &  x,
const BCP_vec< T > &  y 
)

Definition at line 248 of file BCP_vector.hpp.

References BCP_vec< T >::begin(), BCP_vec< T >::end(), and BCP_vec< T >::size().

template<class T >
bool operator< ( BCP_vec< T > &  x,
BCP_vec< T > &  y 
)

Definition at line 254 of file BCP_vector.hpp.

template<class T >
void purge_ptr_vector ( BCP_vec< T * > &  pvec,
typename BCP_vec< T * >::iterator  first,
typename BCP_vec< T * >::iterator  last 
)

This function purges the entries [first,last) from the vector of pointers pvec.

Since these entries are pointers, first operator delete is invoked for each of them, then the pointers are erased from the vector.

Definition at line 266 of file BCP_vector.hpp.

References BCP_vec< T >::erase().

Referenced by purge_ptr_vector(), BCP_lp_cut_pool::~BCP_lp_cut_pool(), BCP_lp_var_pool::~BCP_lp_var_pool(), BCP_presolved_lp_brobj::~BCP_presolved_lp_brobj(), BCP_solution_generic::~BCP_solution_generic(), MCF1_lp::~MCF1_lp(), MCF2_lp::~MCF2_lp(), MCF3_lp::~MCF3_lp(), MKC_lp::~MKC_lp(), and MKC_tm::~MKC_tm().

template<class T >
void purge_ptr_vector ( BCP_vec< T * > &  pvec)

This function purges all the entries from the vector of pointers pvec.

Since these entries are pointers, first operator delete is invoked for each of them, then the pointers are erased from the vector.

Definition at line 285 of file BCP_vector.hpp.

References BCP_vec< T >::begin(), BCP_vec< T >::end(), and purge_ptr_vector().

template<class T >
void purge_ptr_vector_by_index ( BCP_vec< T * > &  pvec,
typename BCP_vec< int >::const_iterator  first,
typename BCP_vec< int >::const_iterator  last 
)

This function purges the entries indexed by [first,last) from the vector of pointers pvec.

Since these entries are pointers, first operator delete is invoked for each of them, then the pointers are erased from the vector.

Definition at line 297 of file BCP_vector.hpp.

References BCP_vec< T >::erase_by_index().

template<class T >
void keep_ptr_vector_by_index ( BCP_vec< T * > &  pvec,
typename BCP_vec< int >::const_iterator  first,
typename BCP_vec< int >::const_iterator  last 
)

This function keeps only the entries indexed by [first,last) from the vector of pointers pvec.

No sanity check is performed.

Definition at line 316 of file BCP_vector.hpp.

References BCP_vec< T >::keep_by_index(), and BCP_vec< T >::size().