angel  mercurial changeset: <a href="http://mercurial.mcs.anl.gov/ad/RoseFE_angel/rev/b18cec041a55" target="_parent">b18cec041a55</a>
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 >:

Public Types

typedef Ad_graph_t ad_graph_t
 
typedef El_spec_t el_spec_t
 

Public Member Functions

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

Public Attributes

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

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: