angel::elimination_history_t< Ad_graph_t, El_spec_t > Class Template Reference

Elimination history. More...

#include <eliminations.hpp>

Collaboration diagram for angel::elimination_history_t< Ad_graph_t, El_spec_t >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef Ad_graph_t ad_graph_t
typedef El_spec_t el_spec_t

Public Member Functions

 elimination_history_t ()
 Default constructor.
 elimination_history_t (const Ad_graph_t &_cg)
 Constructor with empty sequence.
 elimination_history_t (const Ad_graph_t &_og, const vector< El_spec_t > &_seq, const Ad_graph_t &_cg, int _ccosts=0)
 Constructor.
 elimination_history_t (const Ad_graph_t &_og, const vector< El_spec_t > &_seq)
 Constructor.
 elimination_history_t (const elimination_history_t &eh)
 Copy constructor.
elimination_history_toperator= (const elimination_history_t &eh)
 Assign operator.
void swap (elimination_history_t &eh)
 Swap.
int elimination (El_spec_t el)
 Eliminate el from cg.
bool check_sequence () const
 Checks if og --seq--> cg.
bool check () const
 Checks if og --seq--> cg and consistency of both graphs.
bool rebuild_graph ()
 Rebuild cg from og and seq.
template<typename Heuristic_t>
void complete_sequence (Heuristic_t h)
 Complete sequence by heuristic h.

Public Attributes

const Ad_graph_t og
 The original graph.
vector< El_spec_t > seq
 Elimination sequence.
Ad_graph_t cg
 Current graph.
int ccosts
 Current costs (og -> cg).


Detailed Description

template<typename Ad_graph_t, typename El_spec_t>
class angel::elimination_history_t< Ad_graph_t, El_spec_t >

Elimination history.

Stores a c- or line graph and an elimination sequence, where the application of the sequence to the original graph shall result in this graph. This class is introduced to use vertex, edge, and face elimination in LSA (see sa.hpp).

Definition at line 579 of file eliminations.hpp.


Member Typedef Documentation

template<typename Ad_graph_t, typename El_spec_t>
typedef Ad_graph_t angel::elimination_history_t< Ad_graph_t, El_spec_t >::ad_graph_t

Definition at line 588 of file eliminations.hpp.

template<typename Ad_graph_t, typename El_spec_t>
typedef El_spec_t angel::elimination_history_t< Ad_graph_t, El_spec_t >::el_spec_t

Definition at line 589 of file eliminations.hpp.


Constructor & Destructor Documentation

template<typename Ad_graph_t, typename El_spec_t>
angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination_history_t (  )  [inline]

Default constructor.

Only for completeness, better not use.

Definition at line 595 of file eliminations.hpp.

template<typename Ad_graph_t, typename El_spec_t>
angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination_history_t ( const Ad_graph_t &  _cg  )  [inline]

Constructor with empty sequence.

Parameters:
_cg Graph, which is copied into og and cg

Definition at line 600 of file eliminations.hpp.

References angel::elimination_history_t< Ad_graph_t, El_spec_t >::check(), and THROW_EXCEPT_MACRO.

Here is the call graph for this function:

template<typename Ad_graph_t, typename El_spec_t>
angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination_history_t ( const Ad_graph_t &  _og,
const vector< El_spec_t > &  _seq,
const Ad_graph_t &  _cg,
int  _ccosts = 0 
) [inline]

Constructor.

Parameters:
_og Original line graph
_seq Elimination sequence
_cg Current line graph
_ccosts Current costs In debug mode it is checked if application of _seq to _og yields _cg

Definition at line 611 of file eliminations.hpp.

References angel::elimination_history_t< Ad_graph_t, El_spec_t >::check(), and THROW_EXCEPT_MACRO.

Here is the call graph for this function:

template<typename Ad_graph_t, typename El_spec_t>
angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination_history_t ( const Ad_graph_t &  _og,
const vector< El_spec_t > &  _seq 
) [inline]

Constructor.

Parameters:
_og Original line graph
_seq Elimination sequence
Current line graph _cg is built by application of _seq to _og

Definition at line 622 of file eliminations.hpp.

References angel::elimination_history_t< Ad_graph_t, El_spec_t >::og, angel::elimination_history_t< Ad_graph_t, El_spec_t >::rebuild_graph(), and THROW_EXCEPT_MACRO.

Here is the call graph for this function:

template<typename Ad_graph_t, typename El_spec_t>
angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination_history_t ( const elimination_history_t< Ad_graph_t, El_spec_t > &  eh  )  [inline]

Copy constructor.

Definition at line 630 of file eliminations.hpp.

References angel::elimination_history_t< Ad_graph_t, El_spec_t >::cg, angel::elimination_history_t< Ad_graph_t, El_spec_t >::check_sequence(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::og, and THROW_EXCEPT_MACRO.

Here is the call graph for this function:


Member Function Documentation

template<typename Ad_graph_t, typename El_spec_t>
elimination_history_t& angel::elimination_history_t< Ad_graph_t, El_spec_t >::operator= ( const elimination_history_t< Ad_graph_t, El_spec_t > &  eh  )  [inline]

Assign operator.

Definition at line 638 of file eliminations.hpp.

References angel::elimination_history_t< Ad_graph_t, El_spec_t >::ccosts, angel::elimination_history_t< Ad_graph_t, El_spec_t >::cg, angel::elimination_history_t< Ad_graph_t, El_spec_t >::check(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::og, angel::elimination_history_t< Ad_graph_t, El_spec_t >::seq, and THROW_DEBUG_EXCEPT_MACRO.

Here is the call graph for this function:

template<typename Ad_graph_t, typename El_spec_t>
void angel::elimination_history_t< Ad_graph_t, El_spec_t >::swap ( elimination_history_t< Ad_graph_t, El_spec_t > &  eh  )  [inline]

Swap.

Definition at line 644 of file eliminations.hpp.

References angel::elimination_history_t< Ad_graph_t, El_spec_t >::ccosts, angel::elimination_history_t< Ad_graph_t, El_spec_t >::cg, angel::elimination_history_t< Ad_graph_t, El_spec_t >::check(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::og, angel::elimination_history_t< Ad_graph_t, El_spec_t >::seq, and THROW_DEBUG_EXCEPT_MACRO.

Here is the call graph for this function:

template<typename Ad_graph_t, typename El_spec_t>
int angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination ( El_spec_t  el  )  [inline]

Eliminate el from cg.

See also:
eliminate_object
It calls eliminate_objects (el, cg). The first parameter of eliminate_objects may be a non-const reference, which is for instance useful for triplet_t to return the line graph node inserted or where the absorption took place. The return value of eliminate_objects (el, cg) must be the elimination costs. Costs greater than zero are assumed as successful elimination (trivial eliminations are not considered at this point) and el is appended to seq. If el is passed as non-const reference its value after the elimination is appended.

Definition at line 660 of file eliminations.hpp.

References angel::elimination_history_t< Ad_graph_t, El_spec_t >::ccosts, angel::elimination_history_t< Ad_graph_t, El_spec_t >::cg, angel::eliminate(), and angel::elimination_history_t< Ad_graph_t, El_spec_t >::seq.

Referenced by angel::elimination_history_t< Ad_graph_t, El_spec_t >::complete_sequence(), angel::neighbor_check_meta_t::operator()(), angel::neighbor_sequence_check_t::operator()(), angel::neighbor_multi_step_t::operator()(), and angel::neighbor_last_removable_t::operator()().

Here is the call graph for this function:

template<typename Ad_graph_t, typename El_spec_t>
bool angel::elimination_history_t< Ad_graph_t, El_spec_t >::check_sequence (  )  const [inline]

Checks if og --seq--> cg.

Definition at line 666 of file eliminations.hpp.

References angel::elimination_history_t< Ad_graph_t, El_spec_t >::ccosts, angel::elimination_history_t< Ad_graph_t, El_spec_t >::cg, angel::eliminate(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::og, angel::elimination_history_t< Ad_graph_t, El_spec_t >::seq, angel::write_graph(), and angel::write_vector().

Referenced by angel::elimination_history_t< Ad_graph_t, El_spec_t >::check(), and angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination_history_t().

Here is the call graph for this function:

template<typename Ad_graph_t, typename El_spec_t>
bool angel::elimination_history_t< Ad_graph_t, El_spec_t >::check (  )  const [inline]

Checks if og --seq--> cg and consistency of both graphs.

Definition at line 700 of file eliminations.hpp.

References angel::elimination_history_t< Ad_graph_t, El_spec_t >::cg, angel::elimination_history_t< Ad_graph_t, El_spec_t >::check_sequence(), and angel::elimination_history_t< Ad_graph_t, El_spec_t >::og.

Referenced by angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination_history_t(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::operator=(), and angel::elimination_history_t< Ad_graph_t, El_spec_t >::swap().

Here is the call graph for this function:

template<typename Ad_graph_t, typename El_spec_t>
bool angel::elimination_history_t< Ad_graph_t, El_spec_t >::rebuild_graph (  )  [inline]

Rebuild cg from og and seq.

Definition at line 706 of file eliminations.hpp.

References angel::elimination_history_t< Ad_graph_t, El_spec_t >::ccosts, angel::elimination_history_t< Ad_graph_t, El_spec_t >::cg, angel::eliminate(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::og, and angel::elimination_history_t< Ad_graph_t, El_spec_t >::seq.

Referenced by angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination_history_t(), angel::neighbor_check_meta_t::operator()(), angel::neighbor_sequence_check_t::operator()(), angel::neighbor_multi_step_t::operator()(), and angel::neighbor_last_removable_t::operator()().

Here is the call graph for this function:

template<typename Ad_graph_t, typename El_spec_t>
template<typename Heuristic_t>
void angel::elimination_history_t< Ad_graph_t, El_spec_t >::complete_sequence ( Heuristic_t  h  )  [inline]

Complete sequence by heuristic h.

In SA applications h must be the same heuristic used cost operator (ANGEL cannot check this).

Definition at line 720 of file eliminations.hpp.

References angel::elimination_history_t< Ad_graph_t, El_spec_t >::cg, angel::eliminatable_objects(), and angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination().

Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence_lsa_face(), and xaifBoosterCrossCountryInterface::compute_elimination_sequence_lsa_vertex().

Here is the call graph for this function:


Member Data Documentation

template<typename Ad_graph_t, typename El_spec_t>
const Ad_graph_t angel::elimination_history_t< Ad_graph_t, El_spec_t >::og

The original graph.

Definition at line 583 of file eliminations.hpp.

Referenced by angel::elimination_history_t< Ad_graph_t, El_spec_t >::check(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::check_sequence(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination_history_t(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::operator=(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::rebuild_graph(), and angel::elimination_history_t< Ad_graph_t, El_spec_t >::swap().

template<typename Ad_graph_t, typename El_spec_t>
vector<El_spec_t> angel::elimination_history_t< Ad_graph_t, El_spec_t >::seq

Elimination sequence.

Definition at line 584 of file eliminations.hpp.

Referenced by angel::elimination_history_t< Ad_graph_t, El_spec_t >::check_sequence(), xaifBoosterCrossCountryInterface::compute_elimination_sequence_lsa_face(), xaifBoosterCrossCountryInterface::compute_elimination_sequence_lsa_vertex(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination(), angel::neighbor_check_meta_t::operator()(), angel::neighbor_sequence_check_t::operator()(), angel::neighbor_multi_step_t::operator()(), angel::neighbor_last_removable_t::operator()(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::operator=(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::rebuild_graph(), and angel::elimination_history_t< Ad_graph_t, El_spec_t >::swap().

template<typename Ad_graph_t, typename El_spec_t>
Ad_graph_t angel::elimination_history_t< Ad_graph_t, El_spec_t >::cg

Current graph.

Definition at line 585 of file eliminations.hpp.

Referenced by angel::elimination_history_t< Ad_graph_t, El_spec_t >::check(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::check_sequence(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::complete_sequence(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination_history_t(), angel::neighbor_check_meta_t::operator()(), angel::neighbor_sequence_check_t::operator()(), angel::neighbor_multi_step_t::operator()(), angel::neighbor_last_removable_t::operator()(), angel::SA_elimination_cost_t< Heuristic_t >::operator()(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::operator=(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::rebuild_graph(), and angel::elimination_history_t< Ad_graph_t, El_spec_t >::swap().

template<typename Ad_graph_t, typename El_spec_t>
int angel::elimination_history_t< Ad_graph_t, El_spec_t >::ccosts

Current costs (og -> cg).

Definition at line 586 of file eliminations.hpp.

Referenced by angel::elimination_history_t< Ad_graph_t, El_spec_t >::check_sequence(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination(), angel::SA_elimination_cost_t< Heuristic_t >::operator()(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::operator=(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::rebuild_graph(), and angel::elimination_history_t< Ad_graph_t, El_spec_t >::swap().


The documentation for this class was generated from the following file:
Generated on Wed Mar 11 10:34:45 2009 for angel by  doxygen 1.5.3