angel  mercurial changeset:
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 >:

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 587 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 596 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 597 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 603 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:
_cgGraph, which is copied into og and cg

Definition at line 608 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:
_ogOriginal line graph
_seqElimination sequence
_cgCurrent line graph
_ccostsCurrent costs In debug mode it is checked if application of _seq to _og yields _cg

Definition at line 619 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:
_ogOriginal line graph
_seqElimination sequence

Current line graph _cg is built by application of _seq to _og

Definition at line 630 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]

Member Function Documentation

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 728 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:

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 668 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_last_removable_t::operator()(), angel::neighbor_multi_step_t::operator()(), angel::neighbor_sequence_check_t::operator()(), and angel::neighbor_check_meta_t::operator()().

Here is the call graph for this function:


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines