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 Namespace Reference

Namespace for the complete library. More...

Classes

class  base_exception
 
class  io_exception
 
class  consistency_exception
 
class  write_edge_eliad_op_t
 Operator used in write_graph_eliad. More...
 
struct  no_output_t
 
class  string_stream_output_t
 
struct  stream_output_t
 
struct  vis_display_output_t
 
class  write_vertex_op_t
 
class  write_edge_op_t
 
class  write_edge_bool_op_t
 
class  write_edge_name_op_t
 
class  write_face_op_t
 
class  write_face_number_op_t
 
struct  edge_equal_t
 Compares edges of different graphs. More...
 
struct  edge_less_t
 Compares edges of different graphs (lexicographically) More...
 
class  lex_less_face_line_t
 
class  not_lex_less_face_line_t
 
struct  dec_greater
 
struct  empty_operator_t
 Empty operator class for dummy arguments. More...
 
struct  EdgeType
 
struct  VertexVisited
 Pure BGL type definition of c-graph. More...
 
class  c_graph_t
 C-graph type. More...
 
class  line_graph_t
 Line graph type. More...
 
struct  triplet_t
 Triplet of faces, used in face_elimination_history_t. More...
 
class  predecessor_t
 
class  successor_t
 
struct  edge_elim_t
 Edge edge to eliminate from c-graph and whether it should be front or back eliminated. More...
 
struct  edge_pair_elim_t
 
struct  edge_ij_elim_t
 
struct  accu_exp_t
 
class  accu_exp_graph_t
 
struct  accu_graph_t
 
struct  EdgeRef_t
 
struct  edge_reroute_t
 
class  EdgeElim
 Graph-independent edge elimination. More...
 
class  Rerouting
 Graph-independent rerouting. More...
 
class  Transformation
 Graph-independent transformation. More...
 
struct  elimSeq_cost_t
 
struct  transformationSeq_cost_t
 
struct  edge_vertex_elim_t
 
class  elimination_history_t
 Elimination history. More...
 
struct  random_init_t
 
class  base_heuristic_t
 
class  forward_mode_vertex_t
 Operator class for forward mode in vertex elimination. More...
 
class  reverse_mode_vertex_t
 Operator class for reverse mode in vertex elimination. More...
 
class  lowest_markowitz_vertex_t
 Operator class for lowest Markowitz in vertex elimination. More...
 
class  lowest_relative_markowitz_vertex_t
 Operator class for relative lowest Markowitz in vertex elimination. More...
 
class  lowest_fill_in_vertex_t
 Operator class for lowest fill-in in vertex elimination. More...
 
class  lmmd_vertex_t
 Class for lowest Markowitz with minimal damage in vertex elimination. More...
 
class  momr_vertex_t
 Operator class for maximal overall Markowitz degree reduction in vertex elimination. More...
 
class  moplr_vertex_t
 Operator class for maximal overall path length reduction in vertex elimination. More...
 
class  forward_mode_edge_t
 Operator class for mixed forward edge elimination. More...
 
class  reverse_mode_edge_t
 Operator class for mixed reverse edge elimination. More...
 
class  lowest_markowitz_edge_t
 Operator class for lowest Markowitz in mixed edge elimination. More...
 
class  lowest_relative_markowitz_edge_t
 Operator class for lowest relative Markowitz in mixed edge elimination. More...
 
class  lmmd_edge_t
 Class for lowest Markowitz with minimal damage in mixed edge elimination. More...
 
class  momr_edge_t
 Operator class for lowest Markowitz in mixed edge elimination. More...
 
class  minimal_distance_edge_t
 Minimizes the maximal distance of vertices involved in an edge elimination The motivation is that for small distances it is not very probable to re-insert one of new edges later. More...
 
class  forward_mode_face_t
 Operator class for forward mode in face elimination. More...
 
class  reverse_mode_face_t
 Operator class for reverse mode in vertex elimination. More...
 
class  reverse_mode_face_whole_vertex_t
 Operator class for reverse_mode_face_whole_vertex. More...
 
class  lowest_markowitz_face_t
 
class  lowest_markowitz_face_complete_t
 Lowest Markowitz for face elimination with completion of vertex elimination. More...
 
class  momr_face_t
 Operator class for maximal overall Markowitz degree reduction in face elimination. More...
 
class  minimal_distance_face_t
 Minimal distance for face elimination. More...
 
class  edge_ij_elim_heuristic_t
 Creates a heuristic for (i,j,front) type from a heuristic for (edge,front). More...
 
class  triplet_heuristic_t
 Creates a heuristic for triplet type from a heuristic for faces. More...
 
class  emulated_vertex_heuristic_t
 Simulates vertex elimination heuristics with edge eliminations. More...
 
class  heuristic_pair_t
 Make a pair of heuristics. More...
 
class  heuristic_triplet_t
 Make a pair of heuristics. More...
 
class  LOG_temperature_t
 Functor that returns logarithmic temperature for LSA. More...
 
class  fixed_temperature_t
 Functor that returns fixed temperature. More...
 
class  SA_elimination_cost_t
 Computes the elimination costs for arbitrary elimination history type. More...
 
struct  neighbor_last_removable_t
 SA neighborhood either eliminate sth from eh.cg or undo last elimination. More...
 
class  neighbor_multi_step_t
 SA neighborhood for multiple eliminations or re-insertions. More...
 
struct  neighbor_sequence_check_t
 SA neighborhood either eliminate face from eh.cg or undo some previous elimination. More...
 
struct  neighbor_check_meta_t
 SA neighborhood either eliminate face from eh.cg or undo some previous elimination. More...
 
class  gamma_adaption_max_t
 $\Gamma$ adaption on maximal min-max-difference More...
 
class  gamma_adaption_average_t
 $\Gamma$ adaption on average min-max-difference More...
 
struct  lmv_op_t
 
struct  lrm_op_t
 
struct  fiv_op_t
 
struct  markowitz_enlargement_front_t
 
struct  markowitz_enlargement_back_t
 
struct  lmmdv_op_t
 
struct  momrv_op_t
 
struct  oplrv_op_t
 
struct  lme_op_t
 
struct  lmmde_op_t
 
struct  momre_op_t
 
struct  diste_op_t
 
struct  lmf_op_t
 
class  new_pik_t
 
struct  source_not_independent_t
 
class  new_iks_t
 
struct  target_not_dependent_t
 
struct  momrf_op_t
 
struct  distf_op_t
 
struct  edge_address_t
 

Typedefs

typedef boost::property
< boost::edge_weight_t, int > 
edge_weight_property
 
typedef boost::property
< boost::edge_index_t, int,
edge_weight_property
edge_index_weight_property
 
typedef boost::property
< EdgeType, int,
edge_index_weight_property
edge_type_index_weight_property
 
typedef boost::property
< VertexVisited, bool > 
vertex_visited_property
 
typedef boost::adjacency_list
< boost::vecS, boost::vecS,
boost::bidirectionalS,
vertex_visited_property,
edge_type_index_weight_property
pure_c_graph_t
 Pure BGL type definition of c-graph. More...
 
typedef std::pair
< c_graph_t::edge_t, bool > 
edge_bool_t
 Pair of c-graph edge and boolean to specify an edge elimination. More...
 
typedef std::pair< int, int > ad_edge_t
 
typedef boost::property
< boost::vertex_degree_t, int > 
vertex_degree_property
 
typedef boost::property
< boost::vertex_name_t,
ad_edge_t,
vertex_degree_property
vertex_name_degree_property
 
typedef boost::adjacency_list
< boost::vecS, boost::vecS,
boost::bidirectionalS,
vertex_name_degree_property,
boost::no_property > 
pure_line_graph_t
 Pure BGL type definition of line graph. More...
 
typedef std::vector< edge_elim_tedge_elim_seq_t
 
typedef std::vector
< edge_pair_elim_t
edge_pair_elim_seq_t
 
typedef std::vector
< edge_ij_elim_t
edge_ij_elim_seq_t
 
typedef boost::property
< boost::vertex_name_t,
accu_exp_t
accu_exp_property
 
typedef boost::adjacency_list
< boost::vecS, boost::vecS,
boost::bidirectionalS,
accu_exp_property,
boost::no_property > 
pure_accu_exp_graph_t
 
typedef std::pair< unsigned
int, unsigned int > 
uint_pair_t
 
typedef std::set
< c_graph_t::vertex_t
vertex_set_t
 
typedef std::map< uint_pair_t,
vertex_set_t
refillDependenceMap_t
 
typedef vector
< edge_vertex_elim_t
edge_vertex_elim_seq_t
 sequences of edges as nodes from line graph More...
 
typedef elimination_history_t
< c_graph_t,
c_graph_t::vertex_t
vertex_elimination_history_t
 Vertex elimination history for LSA usage. More...
 
typedef elimination_history_t
< c_graph_t, edge_ij_elim_t
edge_elimination_history_t
 Edge elimination history for LSA usage. More...
 
typedef elimination_history_t
< line_graph_t, triplet_t
face_elimination_history_t
 Face elimination history for LSA usage. More...
 

Enumerations

enum  vertex_type_t {
  independent, intermediate, dependent, dead_vertex,
  undefined_vertex
}
 Vertex type for vertex_t in c_graph_t and edge_t in line_graph_t. More...
 
enum  Edge_Type_E { VARIABLE_EDGE, UNIT_EDGE, CONSTANT_EDGE }
 
enum  EdgeRefType_E { LCG_EDGE, JAE_VERT, UNDEFINED }
 

Functions

int read_graph_eliad (const string &file_name, c_graph_t &cg, bool retry=true)
 Read graph in EliAD graph format from file. More...
 
void write_face (ostream &stream, line_graph_t::face_t face, const line_graph_t &lg)
 Write a face face of lg to stream. More...
 
void write_face (line_graph_t::face_t face, const line_graph_t &lg)
 Write a face face of lg to standard output. More...
 
void write_face_vector (ostream &stream, const string &s, const vector< line_graph_t::face_t > &v, const line_graph_t &lg)
 Write a vector v of faces from lg to stream with comment s. More...
 
void write_face_vector (const string &s, const vector< line_graph_t::face_t > &v, const line_graph_t &lg)
 Write a vector v of faces from lg to standard output with comment s. More...
 
template<typename T1 , typename T2 >
ostream & operator<< (ostream &stream, const std::pair< T1, T2 > &p)
 Write pair of arbitrary types to stream if their output operator is defined. More...
 
template<typename Scalar_t >
void write_vector (ostream &stream, const string &s, const vector< Scalar_t > &v)
 Write STL vector v to stream with comment s if their output operator is defined. More...
 
template<typename Scalar_t >
void write_vector (const string &s, const vector< Scalar_t > &v)
 Write STL vector v to standard output with comment s if their output operator is defined. More...
 
template<typename Scalar_t , typename Op_t >
void write_vector (ostream &stream, const string &s, const vector< Scalar_t > &v, Op_t op)
 Write STL vector to stream. More...
 
template<typename Scalar_t , typename Op_t >
void write_vector (const string &s, const vector< Scalar_t > &v, Op_t op)
 Write STL vector to standard output. More...
 
template<typename Ad_graph_t >
void write_graph (ostream &stream, const string &s, const Ad_graph_t &adg, bool write_edge_weight)
 Write c-graph or line graph to stream. More...
 
template<typename Ad_graph_t >
void write_graph (const string &s, const Ad_graph_t &adg, bool write_edge_weight)
 Write c-graph or line graph to standard output. More...
 
template<typename Ad_graph_t >
void write_graph (const string &file_name, const string &s, const Ad_graph_t &adg, bool write_edge_weight)
 Write c-graph or line graph to file. More...
 
template<typename Ad_graph_t >
void write_graph (ostream &stream, const string &s, const Ad_graph_t &adg)
 Write c-graph or line graph to stream. More...
 
template<typename Ad_graph_t >
void write_graph (const string &s, const Ad_graph_t &adg)
 Write c-graph or line graph to standard output. More...
 
template<typename Ad_graph_t >
void write_graph (const string &file_name, const string &s, const Ad_graph_t &adg)
 Write c-graph or line graph to file. More...
 
template<typename Ad_graph_t >
void write_graph_eliad (ostream &stream, const Ad_graph_t &adg)
 Write c-graph or line graph in EliAD format to stream. More...
 
template<typename Ad_graph_t >
void write_graph_eliad (const Ad_graph_t &adg)
 Write c-graph or line graph in EliAD format to standard output. More...
 
template<typename Ad_graph_t >
void write_graph_eliad (const string &file_name, const Ad_graph_t &adg)
 Write c-graph or line graph in EliAD format to file. More...
 
template<typename Prop_t , typename Ad_graph_t >
void write_vertex_property (ostream &stream, const string &s, const Prop_t &prop, const Ad_graph_t &adg)
 Write internal vertex property to stream. More...
 
template<typename Prop_t , typename Ad_graph_t >
void write_edge_property (ostream &stream, const string &s, const Prop_t &prop, const Ad_graph_t &adg)
 Write internal edge property to stream. More...
 
void open_log_file (int &argc, char **&argv)
 
void close_log_file ()
 
string numbered_filename (const string &basename, const string &suffix, int number, int width=4)
 
template<class Value_t >
no_output_toperator<< (no_output_t &out, const Value_t &)
 
template<class Value_t >
string_stream_output_toperator<< (string_stream_output_t &out, const Value_t &value)
 
void write_refillDependences (ostream &stream, const refillDependenceMap_t &refillDependences)
 
void writeVertexAndEdgeTypes (ostream &stream, c_graph_t &angelLCG)
 
template<typename Ad_graph_t , typename Op_t >
void for_all_edges (Ad_graph_t &adg, const Op_t &op)
 Applies op to all edges of adg, graph can be changed. More...
 
template<typename Ad_graph_t , typename Op_t >
void for_all_edges (const Ad_graph_t &adg, Op_t &op)
 Applies op to all edges of adg, op can be changed, e.g. for outputs. More...
 
template<typename Ad_graph_t , typename Op_t >
void for_all_in_edges (typename Ad_graph_t::vertex_descriptor v, Ad_graph_t &adg, const Op_t &op)
 Applies op to all in-edges of v, graph can be changed. More...
 
template<typename Ad_graph_t , typename Op_t >
void for_all_out_edges (typename Ad_graph_t::vertex_descriptor v, Ad_graph_t &adg, const Op_t &op)
 Applies op to all out-edges of v, graph can be changed. More...
 
template<typename Ad_graph_t , typename Op_t >
int sum_over_all_in_edges (typename Ad_graph_t::vertex_descriptor v, Ad_graph_t &adg, const Op_t &op)
 Applies op to all in-edges of v and sum it. More...
 
template<typename Ad_graph_t , typename Op_t >
int sum_over_all_out_edges (typename Ad_graph_t::vertex_descriptor v, const Ad_graph_t &adg, const Op_t &op)
 Applies op to all out-edges of v and sum it. More...
 
template<typename Ad_graph_t >
void successor_set (typename Ad_graph_t::vertex_descriptor v, const Ad_graph_t &adg, typename std::vector< typename Ad_graph_t::vertex_descriptor > &vec)
 Returns successor set of v as vector vec. More...
 
template<typename Ad_graph_t >
void sorted_successor_set (typename Ad_graph_t::vertex_descriptor v, const Ad_graph_t &adg, typename std::vector< typename Ad_graph_t::vertex_descriptor > &vec)
 Returns successor set of v as vector vec, vertices are sorted. More...
 
template<typename Ad_graph_t >
void predecessor_set (typename Ad_graph_t::vertex_descriptor v, const Ad_graph_t &adg, typename std::vector< typename Ad_graph_t::vertex_descriptor > &vec)
 Returns successor set of v as vector vec. More...
 
template<typename Ad_graph_t >
void sorted_predecessor_set (typename Ad_graph_t::vertex_descriptor v, const Ad_graph_t &adg, typename std::vector< typename Ad_graph_t::vertex_descriptor > &vec)
 Returns successor set of v as vector vec, vertices are sorted. More...
 
bool reachable (const c_graph_t::vertex_t src, const c_graph_t::vertex_t tgt, c_graph_t &angelLCG)
 Answers a reachability query from src to tgt. More...
 
void vertex_upset (const c_graph_t::vertex_t v, const c_graph_t &angelLCG, vertex_set_t &upset)
 Returns a set of vertices in adg that depend on v. More...
 
void vertex_downset (const c_graph_t::vertex_t v, const c_graph_t &angelLCG, vertex_set_t &downset)
 Returns a set of vertices in adg that v depends on. More...
 
template<typename El_t >
void unique_vector (std::vector< El_t > &v)
 Sorts arbitrary vector and removes double elements. More...
 
template<typename Ad_graph_t >
void common_successors (typename Ad_graph_t::vertex_descriptor v, const Ad_graph_t &adg, typename std::vector< typename Ad_graph_t::vertex_descriptor > &vec)
 Returns set of vertices (in vec) that have common successors with v. More...
 
template<typename Ad_graph_t >
void same_successors (typename Ad_graph_t::vertex_descriptor v, const Ad_graph_t &adg, typename std::vector< typename Ad_graph_t::vertex_descriptor > &vec)
 Returns set of vertices (in vec) that have same successor set as v. More...
 
template<typename Ad_graph_t >
void common_predecessor (typename Ad_graph_t::vertex_descriptor v, const Ad_graph_t &adg, typename std::vector< typename Ad_graph_t::vertex_descriptor > &vec)
 Returns set of vertices (in vec) that have common predecessors with v. More...
 
template<typename Ad_graph_t >
void same_predecessors (typename Ad_graph_t::vertex_descriptor v, const Ad_graph_t &adg, typename std::vector< typename Ad_graph_t::vertex_descriptor > &vec)
 Returns set of vertices (in vec) that have same predecessor set as v. More...
 
template<typename Ad_graph_t >
void same_neighbors (typename Ad_graph_t::vertex_descriptor v, const Ad_graph_t &adg, typename std::vector< typename Ad_graph_t::vertex_descriptor > &vec)
 Returns set of vertices (in vec) that have same predecessor and successor set as v. More...
 
template<typename It_t , typename Op_t >
std::ostream & write_iterators (std::ostream &stream, const std::string &s, It_t begin, It_t end, Op_t op)
 
template<typename Ad_graph_t >
graph_traits< Ad_graph_t >
::edge_iterator 
same_edge (typename Ad_graph_t::edge_descriptor e, const Ad_graph_t &g1, const Ad_graph_t &g2)
 Returns same edge in another graph. More...
 
template<typename Ad_graph_t >
vertex_type_t vertex_type (typename Ad_graph_t::vertex_descriptor v, const Ad_graph_t &adg)
 Functional equivalent for graph class method (more boost-like) More...
 
template<typename Ad_graph_t >
int count_parallel_edges (typename Ad_graph_t::edge_descriptor e, const Ad_graph_t &g)
 
c_graph_t::edge_t getEdge (unsigned int i, unsigned int j, const c_graph_t &angelLCG)
 Returns the edge in angelLCG that has source i and target j. More...
 
bool lex_greater (c_graph_t::edge_t e1, c_graph_t::edge_t e2, const c_graph_t &cg)
 Returns whether e1 is lexicographically greater than e2 w.r.t. source and target. More...
 
bool lex_less (c_graph_t::edge_t e1, c_graph_t::edge_t e2, const c_graph_t &cg)
 Returns whether e1 is lexicographically less than e2 w.r.t. source and target. More...
 
bool inv_lex_greater (c_graph_t::edge_t e1, c_graph_t::edge_t e2, const c_graph_t &cg)
 Returns whether e1 is lexicographically greater than e2 w.r.t. target and source. More...
 
bool inv_lex_less (c_graph_t::edge_t e1, c_graph_t::edge_t e2, const c_graph_t &cg)
 Returns whether e1 is lexicographically less than e2 w.r.t. target and source. More...
 
bool lex_greater (edge_bool_t eb1, edge_bool_t eb2, const c_graph_t &cg)
 
bool lex_less (edge_bool_t eb1, edge_bool_t eb2, const c_graph_t &cg)
 
bool lex_less_face (line_graph_t::face_t e1, line_graph_t::face_t e2, const line_graph_t &lg)
 
int random (int min, int max)
 Random value between min and max, i.e. from [min, max]. More...
 
double random (double n)
 Random value from [0, n) More...
 
int random (int n)
 Random value between 0 and n-1, i.e. from [0, n) More...
 
int random_high (int n, int exp=2)
 Random value from [0, n) where larger values have higher probability (increases with exp) More...
 
int random (const std::vector< double > &p)
 Random number characterized by p, the accumulated probabities. More...
 
void in_out_path_lengths (const c_graph_t &cg, std::vector< int > &vni, std::vector< int > &vli, std::vector< int > &vno, std::vector< int > &vlo)
 Returns for each vertex the number of paths and their overall length. More...
 
bool find_edge (int s, int t, const line_graph_t &lg, std::vector< line_graph_t::edge_t > &ev)
 Searches an edge in line graph that corresponds to (s,t) More...
 
bool is_bipartite (const c_graph_t &cg)
 Tests if cg is bi-partite. More...
 
bool is_tripartite (const line_graph_t &lg)
 Tests if lg is tri-partite. More...
 
void number_dependent_vertices (const c_graph_t &cg, std::vector< int > &v)
 Returns for each vertex how many dependent vertices depent on it. More...
 
void number_independent_vertices (const c_graph_t &cg, std::vector< int > &v)
 Returns for each vertex on how many independent vertices it depends. More...
 
template<typename Ad_graph_t >
void reachable_vertices (const Ad_graph_t &adg, std::vector< bool > &rv)
 Computes all reachable vertices for c- and line graphs. More...
 
template<typename Ad_graph_t >
void relevant_vertices (const Ad_graph_t &adg, std::vector< bool > &rv)
 Computes all relevant vertices for c- and line graphs. More...
 
template<typename Neighbor_t >
bool search_path (const std::vector< c_graph_t::vertex_t > &from, const std::vector< c_graph_t::vertex_t > &to, const Neighbor_t &n, std::vector< c_graph_t::vertex_t > &path, bool breadth_first=false)
 
template<typename Neighbor_t >
int maximal_paths (c_graph_t::vertex_t v, const Neighbor_t &nin, std::vector< std::vector< c_graph_t::vertex_t > > &paths)
 
template<typename Neighbor_t >
int minimal_in_out_degree (c_graph_t::vertex_t v, const Neighbor_t &nin)
 
void minimal_markowitz_degree (const c_graph_t &cg, std::vector< int > &v)
 Minimal Markowitz degree for each vertex. More...
 
int overall_minimal_markowitz_degree (const c_graph_t &cg)
 Sum of minimal Markowitz degrees. More...
 
void permutate_vertices (const c_graph_t &gin, const std::vector< c_graph_t::vertex_t > &p, c_graph_t &gout)
 Permutates vertices, vertex v in gin becomes p[v] in gout. More...
 
void independent_vertices_to_front (const c_graph_t &gin, const std::vector< c_graph_t::vertex_t > &indeps, c_graph_t &gout)
 Independent vertices, given by indeps, becomes first vertices in gout. More...
 
void put_unit_vertex_weight (line_graph_t &lg)
 Sets all vertex labels (in ed) to 1. More...
 
void put_unit_edge_weight (c_graph_t &cg)
 Sets all edge labels (in ew) to 1. More...
 
int renumber_edges (c_graph_t &cg)
 Renumber edges of cg continously, i.e. to [0..num_edges-1]. More...
 
void take_over_successors (c_graph_t::vertex_t v1, c_graph_t::vertex_t v2, int offset, const c_graph_t &g1, int &edge_number, c_graph_t &g2)
 
template<typename Ad_graph_t >
int remove_irrelevant_edges (typename Ad_graph_t::vertex_descriptor i, Ad_graph_t &adg, bool fast=false)
 Removes irrelevant edges from adg starting with i. More...
 
template<typename Ad_graph_t >
int remove_unreachable_edges (typename Ad_graph_t::vertex_descriptor i, Ad_graph_t &adg, bool fast=false)
 Removes unreachable edges from adg starting with i. More...
 
template<typename Ad_graph_t >
int remove_edges (typename Ad_graph_t::vertex_descriptor i, Ad_graph_t &adg)
 Removes irrelevant and unreachable edges from adg starting with i. More...
 
int remove_hoisting_vertices (c_graph_t &cg)
 Removes all vertices with one predecessor and one successor from cg. More...
 
void remove_parallel_edges (c_graph_t &cg)
 Removes parallel edges. More...
 
void remove_trivial_edges (c_graph_t &cg)
 Eliminates all edges with label 1, front elimination is preferred. More...
 
size_t block_begin (size_t i, size_t p, size_t n)
 First index in ith of p blocks where overall size is n (indices 0..n-1) More...
 
double gen_prob ()
 Returns a random number between zero and one. More...
 
unsigned int chooseTarget_sa (std::vector< double > &deltaE)
 Randomly chooses an index into the vector deltaE. More...
 
int chooseEdgeElimRandomly (std::vector< double > &deltaE)
 
int chooseEdgeElimRandomlyGreedy (std::vector< double > &deltaE)
 
bool operator== (const c_graph_t &g1, const c_graph_t &g2)
 Compares two c-graphs. More...
 
bool operator!= (const c_graph_t &g1, const c_graph_t &g2)
 Compares two c-graphs. More...
 
int overall_markowitz_degree (const c_graph_t &cg)
 Markowitz degree of all vertices in cg. More...
 
bool vertex_eliminatable (const c_graph_t &cg)
 Whether cg can be transformed into bipartite graph by vertex eliminations. More...
 
template<typename Ad_graph_t >
std::pair< typename
Ad_graph_t::edge_descriptor,
bool > 
edge (typename Ad_graph_t::vertex_descriptor u, typename Ad_graph_t::vertex_descriptor v, const Ad_graph_t &g)
 Replaces edge function of BGL. More...
 
void edge_vertex_name (line_graph_t::edge_t e, const line_graph_t &lg, int &i, int &j)
 Vertex pair representation of an edge in line graph. More...
 
void face_vertex_name (line_graph_t::face_t f, const line_graph_t &lg, int &i, int &j, int &k)
 Vertex triplet representation of a face. More...
 
bool operator== (const line_graph_t &g1, const line_graph_t &g2)
 Compares two line graphs. More...
 
bool operator!= (const line_graph_t &g1, const line_graph_t &g2)
 Compares two line graphs. More...
 
int overall_markowitz_degree (const line_graph_t &lg)
 Markowitz degree of all vertices. More...
 
int markowitz_degree (int j, const line_graph_t &lg)
 Markowitz. More...
 
std::ostream & operator<< (std::ostream &stream, const triplet_t &t)
 Output operator of triplet_t. More...
 
std::ostream & operator<< (std::ostream &stream, const edge_pair_elim_t &ee)
 Output operator of edge_pair_elim_t. More...
 
std::ostream & operator<< (std::ostream &stream, const edge_ij_elim_t &ee)
 Output operator of edge_ij_elim_t. More...
 
std::ostream & operator<< (std::ostream &stream, const accu_exp_t &exp)
 
int vertex_elimination (c_graph_t::vertex_t v, c_graph_t &cg)
 
int vertex_elimination (int j, c_graph_t &cg)
 
int front_edge_elimination (c_graph_t::edge_t e, c_graph_t &cg)
 
int front_edge_elimination (c_graph_t::vertex_t i, c_graph_t::vertex_t j, c_graph_t &cg)
 
int front_edge_elimination (int i, int j, c_graph_t &cg)
 
int back_edge_elimination (c_graph_t::edge_t e, c_graph_t &cg)
 
int back_edge_elimination (c_graph_t::vertex_t i, c_graph_t::vertex_t j, c_graph_t &cg)
 
int back_edge_elimination (int i, int j, c_graph_t &cg)
 
int edge_elimination (c_graph_t::edge_t e, bool front, c_graph_t &cg)
 
int edge_elimination (edge_bool_t e, c_graph_t &cg)
 
int edge_elimination (c_graph_t::vertex_t i, c_graph_t::vertex_t j, bool front, c_graph_t &cg)
 
int edge_elimination (int i, int j, bool front, c_graph_t &cg)
 
int edge_elimination (edge_ij_elim_t ee, c_graph_t &cg)
 Edge elimination specified by ee. More...
 
int vertex_elimination (const vector< int > &seq, c_graph_t &cg)
 
int edge_elimination (const edge_elim_seq_t &seq, c_graph_t &cg)
 
int edge_elimination (const edge_pair_elim_seq_t &seq, c_graph_t &cg)
 
int edge_elimination (const edge_ij_elim_seq_t &seq, c_graph_t &cg)
 
int vertex_elimination (int j, line_graph_t &lg)
 
int front_edge_elimination (int i, int j, line_graph_t &lg)
 
int front_edge_elimination (line_graph_t::edge_t vij, line_graph_t &lg)
 
int back_edge_elimination (int i, int j, line_graph_t &lg)
 
int back_edge_elimination (line_graph_t::edge_t vij, line_graph_t &lg)
 
int edge_elimination (int i, int j, bool front, line_graph_t &lg)
 
int edge_elimination (line_graph_t::edge_t vij, bool front, line_graph_t &lg)
 Front elimination of edge vij from line graph lg if front=true otherwise back eliminination. More...
 
int edge_elimination (const edge_vertex_elim_seq_t &seq, line_graph_t &lg)
 Eliminate sequence seq of edges from line graph lg. More...
 
int face_elimination (line_graph_t::face_t f, int kr, line_graph_t &lg, accu_graph_t &ac)
 
int face_elimination (line_graph_t::face_t f, int kr, line_graph_t &lg)
 
int face_elimination (line_graph_t::face_t f, line_graph_t &lg)
 
int face_elimination (int i, int j, line_graph_t &lg)
 
int face_elimination (int i, int j, int kr, line_graph_t &lg)
 
int face_elimination (int i, int j, int kr, line_graph_t &lg, accu_graph_t &ac)
 
int face_elimination (triplet_t &t, line_graph_t &lg)
 
int face_elimination (triplet_t &t, line_graph_t &lg, accu_graph_t &ac)
 
int was_non_trivial_elimination (int i, int j, int k, const line_graph_t &lg)
 
int was_non_trivial_elimination (line_graph_t::face_t f, int k, const line_graph_t &lg)
 
int eliminate (c_graph_t::vertex_t v, c_graph_t &cg)
 Overloaded elimination for templates, here vertex elimination in c-graph. More...
 
int eliminate (int j, c_graph_t &cg)
 Overloaded elimination for templates, here vertex elimination in c-graph. More...
 
int eliminate (int j, line_graph_t &lg)
 Overloaded elimination for templates, here vertex elimination in line graph. More...
 
int eliminate (edge_bool_t e, c_graph_t &cg)
 Overloaded elimination for templates, here vertex elimination in c-graph. More...
 
int eliminate (edge_ij_elim_t ee, c_graph_t &cg)
 Overloaded elimination for templates, here vertex elimination in c-graph. More...
 
int eliminate (line_graph_t::face_t f, line_graph_t &lg)
 
int eliminate (triplet_t &t, line_graph_t &lg)
 
int eliminatable_vertices (const c_graph_t &cg, vector< c_graph_t::vertex_t > &vv)
 Returns a set of vertices that can be eliminated from c-graph cg. More...
 
int semi_eliminatable_vertices (const c_graph_t &cg, vector< c_graph_t::vertex_t > &vv)
 Returns a set of vertices that can be eliminated from c-graph cg by edge elimination. More...
 
int eliminatable_edges (const c_graph_t &cg, vector< c_graph_t::edge_t > &ev)
 Returns a set of edges that can be eliminated from c-graph cg. More...
 
int front_eliminatable_edges (const c_graph_t &cg, vector< c_graph_t::edge_t > &ev)
 Returns a set of edges that can be front eliminated from c-graph cg. More...
 
int back_eliminatable_edges (const c_graph_t &cg, vector< c_graph_t::edge_t > &ev)
 Returns a set of edges that can be back eliminated from c-graph cg. More...
 
int eliminatable_edges (const c_graph_t &cg, vector< edge_bool_t > &ev)
 Returns a set of edges that can be eliminated from c-graph cg and how. More...
 
int eliminatable_edges (const c_graph_t &cg, vector< edge_ij_elim_t > &ev)
 Returns a set of edges that can be eliminated from c-graph cg and how. More...
 
unsigned int eliminatable_edges (const c_graph_t &cg, vector< EdgeElim > &ev)
 Returns a set of edges that can be eliminated from c-graph cg. More...
 
int eliminatable_faces (const line_graph_t &lg, vector< line_graph_t::face_t > &fv)
 Returns a set of faces that can be eliminated from line graph lg. More...
 
int eliminatable_triplets (const line_graph_t &lg, vector< triplet_t > &tv)
 Returns a set of eliminatable faces as triplets tv from line graph lg. More...
 
int eliminatable_objects (const c_graph_t &cg, vector< c_graph_t::vertex_t > &vv)
 Synonym of eliminatable_vertices for usage in templates. More...
 
int eliminatable_objects (const c_graph_t &cg, vector< c_graph_t::edge_t > &ev)
 Synonym of eliminatable_edges for usage in templates. More...
 
int eliminatable_objects (const c_graph_t &cg, vector< edge_bool_t > &ev)
 Synonym of eliminatable_edges for usage in templates. More...
 
int eliminatable_objects (const c_graph_t &cg, vector< edge_ij_elim_t > &ev)
 Synonym of eliminatable_edges for usage in templates. More...
 
int eliminatable_objects (const line_graph_t &lg, vector< line_graph_t::face_t > &fv)
 Synonym of eliminatable_faces for usage in templates. More...
 
int eliminatable_objects (const line_graph_t &lg, vector< triplet_t > &tv)
 Synonym of eliminatable_triplets for usage in templates. More...
 
bool convert_elimination_sequence (const vector< c_graph_t::vertex_t > &vv, const c_graph_t &cg, vector< edge_ij_elim_t > &ev)
 Converts vertex elimination sequence into (mixed) edge elimination sequence. More...
 
bool convert_elimination_sequence (const vector< edge_ij_elim_t > &ev, const line_graph_t &lg, vector< triplet_t > &tv)
 Converts (mixed) edge elimination sequence into face elimination sequence. More...
 
EdgeRefType_E getRefType (const c_graph_t::edge_t e, const c_graph_t &angelLCG, const list< EdgeRef_t > &edge_ref_list)
 
const
xaifBoosterCrossCountryInterface::LinearizedComputationalGraphEdge * 
getLCG_p (const c_graph_t::edge_t e, const c_graph_t &angelLCG, const list< EdgeRef_t > &edge_ref_list)
 
xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionVertex * getJAE_p (const c_graph_t::edge_t e, const c_graph_t &angelLCG, const list< EdgeRef_t > &edge_ref_list)
 
void setJaevRef (const c_graph_t::edge_t e, xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionVertex &jaev, const c_graph_t &angelLCG, const list< EdgeRef_t > &edge_ref_list)
 
void removeRef (const c_graph_t::edge_t e, const c_graph_t &angelLCG, list< EdgeRef_t > &edge_ref_list)
 
unsigned int multiply_edge_pair_directly (const c_graph_t::edge_t e1, const c_graph_t::edge_t e2, c_graph_t &angelLCG, list< EdgeRef_t > &edge_ref_list, xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionList &jae_list)
 
unsigned int front_eliminate_edge_directly (c_graph_t::edge_t e, c_graph_t &angelLCG, list< EdgeRef_t > &edge_ref_list, xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionList &jae_list)
 
unsigned int back_eliminate_edge_directly (c_graph_t::edge_t e, c_graph_t &angelLCG, list< EdgeRef_t > &edge_ref_list, xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionList &jae_list)
 
unsigned int pair_elim (c_graph_t::edge_t e1, c_graph_t::edge_t e2, c_graph_t &angelLCG, const elimSeq_cost_t &currentElimSeq, refillDependenceMap_t &refillDependences)
 
unsigned int front_elim (c_graph_t::edge_t e, c_graph_t &angelLCG, const elimSeq_cost_t &currentElimSeq, refillDependenceMap_t &refillDependences)
 
unsigned int back_elim (c_graph_t::edge_t e, c_graph_t &angelLCG, const elimSeq_cost_t &currentElimSeq, refillDependenceMap_t &refillDependences)
 
unsigned int pairElim_noJAE (c_graph_t::edge_t e1, c_graph_t::edge_t e2, c_graph_t &angelLCG, const transformationSeq_cost_t *currentTransformationSequence, refillDependenceMap_t &refillDependences)
 
unsigned int frontEdgeElimination_noJAE (c_graph_t::edge_t e, c_graph_t &angelLCG, const transformationSeq_cost_t *currentTransformationSequence, refillDependenceMap_t &refillDependences)
 
unsigned int backEdgeElimination_noJAE (c_graph_t::edge_t e, c_graph_t &angelLCG, const transformationSeq_cost_t *currentTransformationSequence, refillDependenceMap_t &refillDependences)
 
void random_statement (int inputs, int expr, const std::vector< double > &p, c_graph_t &statement)
 Generates a random statement. More...
 
void random_statement_vector (int max_expr, double unary, std::vector< c_graph_t > &statement_vector)
 Generates a vector of random statements. More...
 
void stats2block (int inputs, int outputs, const std::vector< c_graph_t > &stats, c_graph_t &block)
 Build a block from a list of statements. More...
 
void random_block (int inputs, int outputs, int stats, int max_exp, double unary, c_graph_t &block)
 Generates a random basic block. More...
 
void block2loop (const c_graph_t &block, int loops, c_graph_t &loop)
 Generates a DAG that represents a loop over the block. More...
 
template<class Object_t , class Ad_graph_t , class Op_t , class Objective_t >
int standard_heuristic_op (const vector< Object_t > &v1, const Ad_graph_t &adg, vector< Object_t > &v2, Op_t op, base_heuristic_t< Objective_t > &h)
 Find best subset of v1 w.r.t. op, skeleton for new heuristics. More...
 
int forward_mode_edge_f (const vector< c_graph_t::edge_t > &ev1, bool front, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Forward mode in edge elimination. More...
 
int forward_mode_edge_front (const vector< c_graph_t::edge_t > &ev1, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Forward mode in front edge elimination. More...
 
int forward_mode_edge_back (const vector< c_graph_t::edge_t > &ev1, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Forward mode in back edge elimination. More...
 
int reverse_mode_edge_f (const vector< c_graph_t::edge_t > &ev1, bool front, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Reverse mode in edge elimination. More...
 
int reverse_mode_edge_front (const vector< c_graph_t::edge_t > &ev1, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Reverse mode in front edge elimination. More...
 
int reverse_mode_edge_back (const vector< c_graph_t::edge_t > &ev1, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Reverse mode in back edge elimination. More...
 
int lowest_markowitz_edge_f (const vector< c_graph_t::edge_t > &ev1, bool front, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Lowest Markowitz in edge elimination. More...
 
int lowest_markowitz_edge_front (const vector< c_graph_t::edge_t > &ev1, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Lowest Markowitz in front edge elimination. More...
 
int lowest_markowitz_edge_back (const vector< c_graph_t::edge_t > &ev1, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Lowest Markowitz in back edge elimination. More...
 
int lowest_relative_markowitz_edge_f (const vector< c_graph_t::edge_t > &ev1, bool front, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Lowest relative Markowitz in edge elimination. More...
 
int lowest_relative_markowitz_edge_front (const vector< c_graph_t::edge_t > &ev1, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Lowest relative Markowitz in front edge elimination. More...
 
int lowest_relative_markowitz_edge_back (const vector< c_graph_t::edge_t > &ev1, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Lowest relative Markowitz in back edge elimination. More...
 
int lowest_fill_in_edge_f (const vector< c_graph_t::edge_t > &ev1, bool front, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Lowest Fill-in in edge elimination. More...
 
int lowest_fill_in_edge_front (const vector< c_graph_t::edge_t > &ev1, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Lowest fill-in in front edge elimination. More...
 
int lowest_fill_in_edge_back (const vector< c_graph_t::edge_t > &ev1, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Lowest fill-in in back edge elimination. More...
 
int momr_edge_f (const vector< c_graph_t::edge_t > &ev1, bool front, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Maximal overall Markowitz reduction in edge elimination. More...
 
int momr_edge_front (const vector< c_graph_t::edge_t > &ev1, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Maximal overall Markowitz reduction in front edge elimination. More...
 
int momr_edge_back (const vector< c_graph_t::edge_t > &ev1, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Maximal overall Markowitz reduction in back edge elimination. More...
 
int moplr_edge (const vector< c_graph_t::edge_t > &ev1, bool front, const c_graph_t &cg, vector< c_graph_t::edge_t > &ev2)
 Maximal overall path length reduction in mixed edge elimination. More...
 
void markowitz_on_line_graph (const line_graph_t &lg, vector< int > &mdegree)
 
template<class Object_t , class Ad_graph_t , class Heuristic_t >
int use_heuristic (const Ad_graph_t &adg, vector< Object_t > &el_seq, Heuristic_t h)
 Use heuristic to transform c-/line graph into bi-/tri-partite graph. More...
 
template<class Object_t , class Ad_graph_t , class Heuristic_t >
int use_heuristic_noconst (Ad_graph_t &adg, vector< Object_t > &el_seq, Heuristic_t h)
 Use heuristic to transform c-/line graph into bi-/tri-partite graph. More...
 
template<class Object_t , class Ad_graph_t , class Heuristic_t >
int use_heuristic_debug (const Ad_graph_t &adg, vector< Object_t > &el_seq, Heuristic_t h)
 Debugging version of use_heuristic, several outputs. More...
 
template<class Object_t , class Ad_graph_t , class Heuristic_t , class Output_t >
int use_heuristic_trace (const Ad_graph_t &adg, vector< Object_t > &el_seq, Heuristic_t h, Output_t output)
 Tracing version of use_heuristic, writes costs for every elimination. More...
 
template<class Object_t , class Ad_graph_t , class Heuristic_t , class Output_t >
int apply_heuristic (const Ad_graph_t &adg, vector< Object_t > &el_seq, Heuristic_t h, Output_t output)
 Applies heuristic and uses output visitor write costs and graphs for every elimination. More...
 
template<class Object_t , class Ad_graph_t , class Heuristic1_t , class Heuristic2_t , class Heuristic3_t , class Heuristic4_t , class Heuristic5_t >
int best_heuristic (const Ad_graph_t &adg, vector< Object_t > &el_seq, Heuristic1_t h1, Heuristic2_t h2, Heuristic3_t h3, Heuristic4_t h4, Heuristic5_t h5)
 Applies 5 heuristics to adg and returns the elimination sequence of the cheapest one. More...
 
template<class Object_t , class Ad_graph_t , class Op_t >
int find_best_subset (const vector< Object_t > &v1, const Ad_graph_t &adg, vector< Object_t > &v2, Op_t op, bool maximize)
 Find best subset of v1 w.r.t. op, skeleton for new heuristics. More...
 
int edge_elim_effect (const edge_bool_t be, const c_graph_t &angelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel)
 Determines the effect, in terms of nontrivial edge count, of performing edge elimination be. More...
 
int edge_elim_effect (const EdgeElim ee, const c_graph_t &angelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel)
 Determines the effect, in terms of nontrivial edge count, of performing edge elimination ee. More...
 
bool maintaining_edge_eliminations (const vector< EdgeElim > &bev1, const c_graph_t &angelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, vector< EdgeElim > &bev2)
 Filter that selects edge elimination targets that don't increase the nontrivial edge count. More...
 
bool reducing_edge_eliminations (const vector< EdgeElim > &bev1, const c_graph_t &angelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, vector< EdgeElim > &bev2)
 Filter that selects edge elimination targets that decrease the nontrivial edge count. More...
 
bool refill_avoiding_edge_eliminations (const vector< EdgeElim > &bev1, c_graph_t &angelLCG, const refillDependenceMap_t refillDependences, vector< EdgeElim > &bev2)
 Filter that selects edge elimination targets whose refill dependences (a possibly empty set of vertices) have been met (meaning that there is no alternate path for the edge through the vertex). More...
 
bool rerouting_considerate_edge_eliminations (const vector< EdgeElim > &bev, const c_graph_t &angelLCG, const std::vector< Transformation > &transformationsPerformedV, vector< EdgeElim > &reroutingConsiderateEdgeElimsV)
 
unsigned int lowestMarkowitzEdgeElim (const vector< EdgeElim > &inEEV, const c_graph_t &angelLCG, vector< EdgeElim > &outEEV)
 
bool reverseModeEdgeElim (const vector< EdgeElim > &inEEV, const c_graph_t &angelLCG, vector< EdgeElim > &outEEV)
 
size_t noncyclicReroutings (const vector< Rerouting > &erv, const std::vector< Transformation > &transformationsPerformedV, const c_graph_t &angelLCG, vector< Rerouting > &noncyclicReroutingsV)
 
bool reducing_reroutings (const vector< Rerouting > &erv, const c_graph_t &angelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, vector< Rerouting > &reducingReroutingsV)
 
int transformation_effect (const Transformation t, const c_graph_t &angelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel)
 
bool all_viable_transformations (c_graph_t &angelLCG, const std::vector< Transformation > &transformationsPerformedV, vector< Transformation > &allViableTransformationsV)
 
bool maintaining_transformations (const vector< Transformation > &tv, const c_graph_t &angelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, vector< Transformation > &maintainingTransformationsV)
 
bool reducing_transformations (const vector< Transformation > &tv, const c_graph_t &angelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, vector< Transformation > &reducingTransformationsV)
 
bool refill_avoiding_transformations (const vector< Transformation > &tv, c_graph_t &angelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, const refillDependenceMap_t &refillDependences, vector< Transformation > &refillAvoidingTransformationsV)
 
bool rerouting_considerate_transformations (const vector< Transformation > &tv, const c_graph_t &angelLCG, const std::vector< Transformation > &transformationsPerformedV, vector< Transformation > &reroutingConsiderateTransformationsV)
 
bool lowest_markowitz_transformations (const vector< Transformation > &tv, const c_graph_t &angelLCG, vector< Transformation > &lowestMarkowitzTransformationsV)
 
bool reverse_mode_transformations (const vector< Transformation > &tv, const c_graph_t &angelLCG, vector< Transformation > &reverseModeTransformationsV)
 
void reroutable_edges (c_graph_t &angelLCG, vector< edge_reroute_t > &erv)
 
unsigned int reroutable_edges (c_graph_t &angelLCG, vector< Rerouting > &allReroutingsV)
 
int reroute_effect (const edge_reroute_t er, const c_graph_t &angelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, bool &incrementIsTrivial)
 
unsigned int preroute_edge_directly (edge_reroute_t er, c_graph_t &angelLCG, list< EdgeRef_t > &edge_ref_list, xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionList &jae_list)
 
unsigned int postroute_edge_directly (edge_reroute_t er, c_graph_t &angelLCG, list< EdgeRef_t > &edge_ref_list, xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionList &jae_list)
 
unsigned int prerouteEdge_noJAE (edge_reroute_t er, c_graph_t &angelLCG)
 
unsigned int postrouteEdge_noJAE (edge_reroute_t er, c_graph_t &angelLCG)
 
template<class Temp_t >
double SA_acceptance (int diff, int it, Temp_t temp)
 Probability to accept new object in SA. More...
 
template<class Object_t , class Neighbor_t , class Cost_t , class Temp_t >
int SA (Object_t &object, Neighbor_t neighbor, Cost_t costs, Temp_t temp, int max_iter)
 Simulated Annealing in a general form. More...
 
template<class Object_t , class Neighbor_t , class Cost_t >
int LSA (Object_t &object, Neighbor_t neighbor, Cost_t costs, double gamma, int max_iter)
 Logarithmic Simulated Annealing in a general form. More...
 
template<class Object_t , class Neighbor_t , class Cost_t >
int FTSA (Object_t &object, Neighbor_t neighbor, Cost_t costs, double t, int max_iter)
 Metropolis with fixed temperature in a general form. More...
 
template<class Object_t , class Neighbor_t , class Cost_t , class Adaption_t >
int ALSA (Object_t &object, Neighbor_t neighbor, Cost_t costs, Adaption_t adaption, double &gamma, int max_iter)
 Adaptive Logarithmic Simulated Annealing in generic form. More...
 
void neighbor_swap (const std::vector< int > &old_seq, std::vector< int > &seq)
 Swap two vertices in sequence (historical, only vertex elimination) More...
 
bool isTrivialEdge (const c_graph_t::edge_t &e, c_graph_t &theAngelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel)
 simply returns true if anf only if e is considered trivial with respect to ourAwarenessLevel More...
 
void assessPairElim (const c_graph_t::edge_t &e1, const c_graph_t::edge_t &e2, c_graph_t &theAngelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, unsigned int &cost, int &totalEdgecountChange, int &nontrivialEdgecountChange)
 theAngelLCG is only not const so that we can access eType More...
 
void assessFrontEdgeElim (const c_graph_t::edge_t &e, c_graph_t &theAngelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, unsigned int &cost, int &totalEdgecountChange, int &nontrivialEdgecountChange)
 theAngelLCG is only not const so that we can access eType More...
 
void assessBackEdgeElim (const c_graph_t::edge_t &e, c_graph_t &theAngelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, unsigned int &cost, int &totalEdgecountChange, int &nontrivialEdgecountChange)
 theAngelLCG is only not const so that we can access eType More...
 
void assessEdgeElim (const EdgeElim &anEdgeElim, c_graph_t &theAngelLCG, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, unsigned int &cost, int &totalEdgecountChange, int &nontrivialEdgecountChange)
 
void postProcessRemainderGraph (c_graph_t &theAngelLCG, xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionList &theJAEList, std::list< EdgeRef_t > &edge_ref_list, const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E ourAwarenessLevel)
 
void write_face (std::ostream &stream, line_graph_t::face_t face, const line_graph_t &lg)
 
void write_face_vector (std::ostream &stream, const std::string &s, const std::vector< line_graph_t::face_t > &v, const line_graph_t &lg)
 
string_stream_output_t cout_string_output (std::cout)
 
vis_display_output_t cout_vis_display_output (std::cout)
 
void permutate_vertices (const c_graph_t &gin, const vector< c_graph_t::vertex_t > &p, c_graph_t &gout)
 
void independent_vertices_to_front (const c_graph_t &gin, const vector< c_graph_t::vertex_t > &indeps, c_graph_t &gout)
 
int eliminatable_edges (const c_graph_t &cg, std::vector< c_graph_t::edge_t > &ev)
 
int front_eliminatable_edges (const c_graph_t &cg, std::vector< c_graph_t::edge_t > &ev)
 
int back_eliminatable_edges (const c_graph_t &cg, std::vector< c_graph_t::edge_t > &ev)
 
int eliminatable_edges (const c_graph_t &cg, std::vector< edge_bool_t > &ev)
 
int eliminatable_edges (const c_graph_t &cg, std::vector< edge_ij_elim_t > &ev)
 
unsigned int eliminatable_edges (const c_graph_t &cg, std::vector< EdgeElim > &ev)
 
int eliminatable_faces (const line_graph_t &lg, std::vector< line_graph_t::face_t > &fv)
 
void random_statement (int inputs, int expr, const vector< double > &p, c_graph_t &statement)
 
int new_in_edges (c_graph_t::edge_t e, const c_graph_t &cg)
 
int new_out_edges (c_graph_t::edge_t e, const c_graph_t &cg)
 
int markowitz_enlargement_front (c_graph_t::edge_t e, const c_graph_t &cg, bool eliminate_parallel_edges=false)
 
int markowitz_enlargement_front (c_graph_t::edge_t e, c_graph_t::edge_t e2, const c_graph_t &cg)
 
int markowitz_enlargement_back (c_graph_t::edge_t e, const c_graph_t &cg, bool eliminate_parallel_edges=false)
 
int markowitz_enlargement_back (c_graph_t::edge_t e, c_graph_t::edge_t e2, const c_graph_t &cg)
 
int markowitz_enlargement_all_neighbors (c_graph_t::vertex_t v, const c_graph_t &cg)
 
lmmd_vertex_t lmmd_vertex (1.0)
 
int oplr_face (c_graph_t::edge_t e1, c_graph_t::edge_t e2, const vector< int > &vni, const vector< int > &vli, const vector< int > &vno, const vector< int > &vlo, const c_graph_t &cg)
 
int oplr_edge_front (c_graph_t::edge_t e, const vector< int > &vni, const vector< int > &vli, const vector< int > &vno, const vector< int > &vlo, const c_graph_t &cg)
 
int oplr_edge_back (c_graph_t::edge_t e, const vector< int > &vni, const vector< int > &vli, const vector< int > &vno, const vector< int > &vlo, const c_graph_t &cg)
 
double fme_obj (edge_bool_t eb, const c_graph_t &cg)
 
double rme_obj (edge_bool_t eb, const c_graph_t &cg)
 
int fill_in_front (c_graph_t::edge_t e, const c_graph_t &cg)
 
int fill_in_back (c_graph_t::edge_t e, const c_graph_t &cg)
 
lmmd_edge_t lmmd_edge (1.0)
 
int lmmd_edge_front (c_graph_t::edge_t e, double w, const c_graph_t &cg)
 
int lmmd_edge_back (c_graph_t::edge_t e, double w, const c_graph_t &cg)
 
int momr_edge_front (c_graph_t::edge_t e, const c_graph_t &cg)
 
int momr_edge_back (c_graph_t::edge_t e, const c_graph_t &cg)
 
double fmf_obj (line_graph_t::face_t f, const line_graph_t &lg)
 
int edge_elim_effect (const edge_bool_t be, const c_graph_t &angelLCG, const AwarenessLevel::AwarenessLevel_E ourAwarenessLevel)
 
int edge_elim_effect (const EdgeElim ee, const c_graph_t &angelLCG, const AwarenessLevel::AwarenessLevel_E ourAwarenessLevel)
 
bool maintaining_edge_eliminations (const vector< EdgeElim > &bev1, const c_graph_t &angelLCG, const AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, vector< EdgeElim > &bev2)
 
bool reducing_edge_eliminations (const vector< EdgeElim > &bev1, const c_graph_t &angelLCG, const AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, vector< EdgeElim > &bev2)
 
bool reducing_reroutings (const vector< Rerouting > &erv, const c_graph_t &angelLCG, const AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, vector< Rerouting > &reducingReroutingsV)
 
int transformation_effect (const Transformation t, const c_graph_t &angelLCG, const AwarenessLevel::AwarenessLevel_E ourAwarenessLevel)
 
bool maintaining_transformations (const vector< Transformation > &tv, const c_graph_t &angelLCG, const AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, vector< Transformation > &maintainingTransformationsV)
 
bool reducing_transformations (const vector< Transformation > &tv, const c_graph_t &angelLCG, const AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, vector< Transformation > &reducingTransformationsV)
 
bool refill_avoiding_transformations (const vector< Transformation > &tv, c_graph_t &angelLCG, const AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, const refillDependenceMap_t &refillDependences, vector< Transformation > &refillAvoidingTransformationsV)
 
int reroute_effect (const edge_reroute_t er, const c_graph_t &angelLCG, const AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, bool &incrementIsTrivial)
 
unsigned int preroute_edge_directly (edge_reroute_t er, c_graph_t &angelLCG, list< EdgeRef_t > &edge_ref_list, JacobianAccumulationExpressionList &jae_list)
 
unsigned int postroute_edge_directly (edge_reroute_t er, c_graph_t &angelLCG, list< EdgeRef_t > &edge_ref_list, JacobianAccumulationExpressionList &jae_list)
 
size_t which_index (const LinearizedComputationalGraphVertex *const add, const vector< const LinearizedComputationalGraphVertex * > &av)
 
void read_graph_xaif_booster (const LinearizedComputationalGraph &xg, c_graph_t &cg, vector< const LinearizedComputationalGraphVertex * > &av, vector< edge_address_t > &ae)
 
const
LinearizedComputationalGraphEdge * 
xaif_edge_pr (line_graph_t::edge_t e, const accu_graph_t &ag, const vector< edge_address_t > &ae)
 
void write_graph_xaif_booster (const accu_graph_t &ag, const vector< const LinearizedComputationalGraphVertex * > &av, const vector< edge_address_t > &ae, JacobianAccumulationExpressionList &JAElist, LinearizedComputationalGraph &remainderLCG, VertexCorrelationList &v_cor_list, EdgeCorrelationList &e_cor_list)
 
unsigned int num_nontrivial_edges (const c_graph_t &angelLCG, const AwarenessLevel::AwarenessLevel_E ourAwarenessLevel)
 
unsigned int numIntermediateVertices (const c_graph_t &angelLCG)
 
unsigned int numIntermediateVerticesWithoutUnitEdge (const c_graph_t &angelLCG)
 
void ourLCG_to_angelLCG (const LinearizedComputationalGraph &ourLCG, vector< const LinearizedComputationalGraphVertex * > &ourLCG_verts, c_graph_t &angelLCG, list< EdgeRef_t > &edge_ref_list)
 
void populate_remainderGraph_and_correlationLists (const c_graph_t &angelLCG, const vector< const LinearizedComputationalGraphVertex * > ourLCG_verts, const list< EdgeRef_t > &edge_ref_list, LinearizedComputationalGraph &remainderLCG, VertexCorrelationList &v_cor_list, EdgeCorrelationList &e_cor_list)
 
unsigned int replay_transformation_seq (c_graph_t &angelLCG, const vector< Transformation > transformationSeqV, unsigned int &previous_numNontrivialEdges, const AwarenessLevel::AwarenessLevel_E ourAwarenessLevel, transformationSeq_cost_t &dummy_transformationSeq_cost, refillDependenceMap_t &dummy_refillDependenceMap)
 

Variables

ofstream log_file
 
no_output_t no_output
 
string_stream_output_t cout_string_output
 
vis_display_output_t cout_vis_display_output
 
random_init_t random_init_object
 
forward_mode_vertex_t forward_mode_vertex
 Forward mode in vertex elimination. More...
 
reverse_mode_vertex_t reverse_mode_vertex
 Reverse mode in vertex elimination. More...
 
lowest_markowitz_vertex_t lowest_markowitz_vertex
 Lowest Markowitz degree first in vertex elimination. More...
 
lowest_relative_markowitz_vertex_t lowest_relative_markowitz_vertex
 Lowest relative Markowitz degree first in vertex elimination. More...
 
lowest_fill_in_vertex_t lowest_fill_in_vertex
 Lowest fill-in in vertex elimination. More...
 
lmmd_vertex_t lmmd_vertex
 Predefined object of lmmd_vertex_t with weight=1.0. More...
 
momr_vertex_t momr_vertex
 Instance of momr_vertex_t, can be used as a function and an argument. More...
 
moplr_vertex_t moplr_vertex
 Maximal overall path length reduction in vertex elimination. More...
 
forward_mode_edge_t forward_mode_edge
 Forward mode in edge elimination (mixed front and back elimination) More...
 
reverse_mode_edge_t reverse_mode_edge
 Reverse mode in edge elimination (mixed front and back elimination) More...
 
lowest_markowitz_edge_t lowest_markowitz_edge
 Lowest Markowitz in edge elimination (mixed front and back elimination) More...
 
lowest_relative_markowitz_edge_t lowest_relative_markowitz_edge
 Lowest relative Markowitz in edge elimination (mixed front and back elimination) More...
 
lmmd_edge_t lmmd_edge
 Predefined object of lmmd_edge_t with weight=1.0. More...
 
momr_edge_t momr_edge
 Maximal overall Markowitz reduction in mixed edge elimination. More...
 
forward_mode_face_t forward_mode_face
 Forward mode in face elimination. More...
 
reverse_mode_face_t reverse_mode_face
 Reverse mode in face elimination. More...
 
reverse_mode_face_whole_vertex_t reverse_mode_face_whole_vertex
 Reverse mode emulating vertex elimination with face eliminations. More...
 
lowest_markowitz_face_t lowest_markowitz_face
 Lowest Markowitz for face elimination. More...
 
momr_face_t momr_face
 Maximal overall Markowitz degree reduction in face elimination. More...
 
minimal_distance_edge_t minimal_distance_edge
 

Detailed Description

Namespace for the complete library.

Typedef Documentation

typedef boost::property<boost::vertex_name_t, accu_exp_t> angel::accu_exp_property

Definition at line 647 of file angel_types.hpp.

typedef std::pair<int, int> angel::ad_edge_t

Definition at line 251 of file angel_types.hpp.

typedef std::pair<c_graph_t::edge_t,bool> angel::edge_bool_t

Pair of c-graph edge and boolean to specify an edge elimination.

Definition at line 244 of file angel_types.hpp.

typedef std::vector<edge_elim_t> angel::edge_elim_seq_t

Sequences of edges from the compute graph with information which edges shall be front eliminate

Definition at line 607 of file angel_types.hpp.

Edge elimination history for LSA usage.

See Also
elimination_history_t

Definition at line 741 of file eliminations.hpp.

Sequences of pairs of vertex numbers with information which edges shall be front eliminate

Definition at line 615 of file angel_types.hpp.

typedef boost::property<boost::edge_index_t, int, edge_weight_property> angel::edge_index_weight_property

Definition at line 59 of file angel_types.hpp.

Sequences of pairs of vertices from the compute graph with information which edges shall be front eliminate

Definition at line 611 of file angel_types.hpp.

Definition at line 60 of file angel_types.hpp.

sequences of edges as nodes from line graph

Definition at line 264 of file eliminations.hpp.

typedef boost::property<boost::edge_weight_t, int> angel::edge_weight_property

Definition at line 58 of file angel_types.hpp.

Face elimination history for LSA usage.

See Also
elimination_history_t

Definition at line 745 of file eliminations.hpp.

typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, accu_exp_property, boost::no_property> angel::pure_accu_exp_graph_t

Definition at line 651 of file angel_types.hpp.

typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, vertex_visited_property, edge_type_index_weight_property> angel::pure_c_graph_t

Pure BGL type definition of c-graph.

Definition at line 80 of file angel_types.hpp.

typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, vertex_name_degree_property, boost::no_property> angel::pure_line_graph_t

Pure BGL type definition of line graph.

Definition at line 258 of file angel_types.hpp.

Definition at line 911 of file angel_types.hpp.

typedef std::pair<unsigned int,unsigned int> angel::uint_pair_t

Definition at line 909 of file angel_types.hpp.

typedef boost::property<boost::vertex_degree_t, int> angel::vertex_degree_property

Definition at line 252 of file angel_types.hpp.

Vertex elimination history for LSA usage.

See Also
elimination_history_t

Definition at line 737 of file eliminations.hpp.

typedef boost::property<boost::vertex_name_t, ad_edge_t, vertex_degree_property> angel::vertex_name_degree_property

Definition at line 253 of file angel_types.hpp.

Definition at line 910 of file angel_types.hpp.

typedef boost::property<VertexVisited, bool> angel::vertex_visited_property

Definition at line 72 of file angel_types.hpp.

Enumeration Type Documentation

Enumerator
VARIABLE_EDGE 
UNIT_EDGE 
CONSTANT_EDGE 

Definition at line 48 of file angel_types.hpp.

Enumerator
LCG_EDGE 
JAE_VERT 
UNDEFINED 

Definition at line 682 of file angel_types.hpp.

Vertex type for vertex_t in c_graph_t and edge_t in line_graph_t.

Enumerator
independent 

Independent vertex.

intermediate 

Non-empty vertex neither independent nor dependent.

dependent 

Independent vertex.

dead_vertex 

Empty vertex, should not be dependent or independent.

undefined_vertex 

Undefined, e.g. out of range.

Definition at line 41 of file angel_types.hpp.

Function Documentation

bool angel::all_viable_transformations ( c_graph_t &  angelLCG,
const std::vector< Transformation > &  transformationsPerformedV,
vector< Transformation > &  allViableTransformationsV 
)

Filter that populates allViableTransformationsV with all possible edge eliminations and all possible reroutings that haven't already been performed (so-called noncyclic reroutings).

Definition at line 1750 of file heuristics.cpp.

References eliminatable_edges(), noncyclicReroutings(), and reroutable_edges().

Referenced by xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence(), and xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random().

Here is the call graph for this function:

template<class Object_t , class Neighbor_t , class Cost_t , class Adaption_t >
int angel::ALSA ( Object_t &  object,
Neighbor_t  neighbor,
Cost_t  costs,
Adaption_t  adaption,
double &  gamma,
int  max_iter 
)

Adaptive Logarithmic Simulated Annealing in generic form.

Parameters
objectSome state in the configuration space.
neighborNeighborhood relation applicable to object
costsCost operator applicable to object
adaptionOperator that can change $\Gamma$
gammaInitial $\Gamma$ in LSA
max_iterMaximal number of iterations
See Also
LSA

ALSA is LSA with the difference that $\Gamma$ can be changed adaptively. The adaption operator records the costs and may change $\Gamma$ on this base. Another difference to LSA is that $\Gamma$ is passed by reference (instead of by value) in order to give feedback about the adaption.

Note
At the moment there are only applications with face_elimination_history_t as Object_t.

Definition at line 51 of file sa_impl.hpp.

References random().

Here is the call graph for this function:

template<class Object_t , class Ad_graph_t , class Heuristic_t , class Output_t >
int angel::apply_heuristic ( const Ad_graph_t &  adg,
vector< Object_t > &  el_seq,
Heuristic_t  h,
Output_t  output 
)
inline

Applies heuristic and uses output visitor write costs and graphs for every elimination.

Parameters
adgc-graph or line graph
el_seqObtained elimination sequence
hHeuristic or combination of heuristics
outputVisitor to where written is
Returns
Elimination costs
See Also
use_heuristic
eliminatable_objects
eliminate
heuristic_pair_t
no_output_t
string_stream_output_t

Definition at line 1307 of file heuristics.hpp.

References eliminatable_objects(), and eliminate().

Here is the call graph for this function:

void angel::assessBackEdgeElim ( const c_graph_t::edge_t e,
c_graph_t theAngelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
unsigned int &  cost,
int &  totalEdgecountChange,
int &  nontrivialEdgecountChange 
)

theAngelLCG is only not const so that we can access eType

Definition at line 546 of file xaif_interface.cpp.

References assessPairElim(), dependent, isTrivialEdge(), and vertex_type().

Referenced by assessEdgeElim().

Here is the call graph for this function:

void angel::assessEdgeElim ( const EdgeElim anEdgeElim,
c_graph_t theAngelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
unsigned int &  cost,
int &  totalEdgecountChange,
int &  nontrivialEdgecountChange 
)

Determine the effect of performing anEdgeElim in theAngelLCG, but without actually doing anything. The results are returned in cost, totalEdgecountChange, and nontrivialEdgecountChange (all passed by reference). theAngelLCG is only not const so that we can access eType.

Definition at line 578 of file xaif_interface.cpp.

References assessBackEdgeElim(), assessFrontEdgeElim(), angel::EdgeElim::getE(), angel::EdgeElim::isFront(), and isTrivialEdge().

Referenced by postProcessRemainderGraph().

Here is the call graph for this function:

void angel::assessFrontEdgeElim ( const c_graph_t::edge_t e,
c_graph_t theAngelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
unsigned int &  cost,
int &  totalEdgecountChange,
int &  nontrivialEdgecountChange 
)

theAngelLCG is only not const so that we can access eType

Definition at line 514 of file xaif_interface.cpp.

References assessPairElim(), dependent, isTrivialEdge(), and vertex_type().

Referenced by assessEdgeElim().

Here is the call graph for this function:

void angel::assessPairElim ( const c_graph_t::edge_t e1,
const c_graph_t::edge_t e2,
c_graph_t theAngelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
unsigned int &  cost,
int &  totalEdgecountChange,
int &  nontrivialEdgecountChange 
)

theAngelLCG is only not const so that we can access eType

Definition at line 460 of file xaif_interface.cpp.

References edge(), THROW_EXCEPT_MACRO, UNIT_EDGE, and VARIABLE_EDGE.

Referenced by assessBackEdgeElim(), and assessFrontEdgeElim().

Here is the call graph for this function:

int angel::back_edge_elimination ( c_graph_t::edge_t  e,
c_graph_t &  cg 
)

Back elimination of edge e from c-graph cg

Returns
The costs (number of operation)

Definition at line 100 of file eliminations.cpp.

References CONSTANT_EDGE, dependent, edge(), independent, angel::c_graph_t::next_edge_number, UNIT_EDGE, VARIABLE_EDGE, angel::c_graph_t::vertex_type(), and vertex_type().

Referenced by back_edge_elimination(), convert_elimination_sequence(), edge_elimination(), momr_edge_back(), remove_trivial_edges(), and vertex_elimination().

Here is the call graph for this function:

int angel::back_edge_elimination ( c_graph_t::vertex_t  i,
c_graph_t::vertex_t  j,
c_graph_t &  cg 
)
inline

Back elimination of edge from vertex i to vertex j from c-graph cg

Returns
The costs (number of operation)

Definition at line 90 of file eliminations.hpp.

References back_edge_elimination(), and edge().

Here is the call graph for this function:

int angel::back_edge_elimination ( int  i,
int  j,
c_graph_t &  cg 
)
inline

Back elimination of edge from vertex with number i to vertex with number j from c-graph cg

Returns
The costs (number of operation)

Definition at line 103 of file eliminations.hpp.

References back_edge_elimination().

Here is the call graph for this function:

int angel::back_edge_elimination ( int  i,
int  j,
line_graph_t &  lg 
)

Back eliminate edge from vertex with number i to vertex number j in line graph lg

All faces (*,i,j) are eliminated

Definition at line 211 of file eliminations.cpp.

References back_edge_elimination(), and find_edge().

Here is the call graph for this function:

int angel::back_edge_elimination ( line_graph_t::edge_t  vij,
line_graph_t &  lg 
)

Back eliminate edge vij in line graph lg

All faces (*,i,j) are eliminated

Definition at line 220 of file eliminations.cpp.

References face_elimination().

Here is the call graph for this function:

unsigned int angel::back_elim ( c_graph_t::edge_t  e,
c_graph_t &  angelLCG,
const elimSeq_cost_t &  currentElimSeq,
refillDependenceMap_t &  refillDependences 
)
int angel::back_eliminatable_edges ( const c_graph_t &  cg,
std::vector< c_graph_t::edge_t > &  ev 
)

Definition at line 392 of file eliminations.cpp.

References independent, and vertex_type().

Here is the call graph for this function:

int angel::back_eliminatable_edges ( const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev 
)

Returns a set of edges that can be back eliminated from c-graph cg.

unsigned int angel::back_eliminate_edge_directly ( c_graph_t::edge_t  e,
c_graph_t &  angelLCG,
list< EdgeRef_t > &  edge_ref_list,
xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionList &  jae_list 
)

Back eliminate an edge from an angel c_graph_t but go directly to a xaifBoosterCrossCountryInterface::JacobianAccumulationExpression, rather than the internal angel accumulation graph type.

Parameters
ethe edge that will be back eliminated.
angelLCGthe c_graph_t (passed by reference) that the elimination is performed on.
edge_ref_listthe stl list container that keeps track of the reference (LCG pointer or JAE pointer) for each edge in angelLCG.
jae_listthe xaifBooster JAE list that we construct incrementally as we perform eliminations.
Returns
The cost (in terms of multiplications) of the elimination.

This function is also aware of unit and constant edges. This entails labeling new edges with the appropriate type, as well as determining the cost appropriately.

Definition at line 706 of file eliminations.cpp.

References dependent, multiply_edge_pair_directly(), removeRef(), and vertex_type().

Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random(), xaifBoosterCrossCountryInterface::computeEliminationSequenceRandom(), and postProcessRemainderGraph().

Here is the call graph for this function:

unsigned int angel::backEdgeElimination_noJAE ( c_graph_t::edge_t  e,
c_graph_t &  angelLCG,
const transformationSeq_cost_t *  currentTransformationSequence,
refillDependenceMap_t &  refillDependences 
)
template<class Object_t , class Ad_graph_t , class Heuristic1_t , class Heuristic2_t , class Heuristic3_t , class Heuristic4_t , class Heuristic5_t >
int angel::best_heuristic ( const Ad_graph_t &  adg,
vector< Object_t > &  el_seq,
Heuristic1_t  h1,
Heuristic2_t  h2,
Heuristic3_t  h3,
Heuristic4_t  h4,
Heuristic5_t  h5 
)
inline

Applies 5 heuristics to adg and returns the elimination sequence of the cheapest one.

Definition at line 92 of file heuristics_impl.hpp.

References use_heuristic().

Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence().

Here is the call graph for this function:

void angel::block2loop ( const c_graph_t &  block,
int  loops,
c_graph_t &  loop 
)

Generates a DAG that represents a loop over the block.

Parameters
blockThe used block
loopsThe number of loops
loopThe resulting loop DAG

Definition at line 257 of file graph_generator.cpp.

References angel::c_graph_t::clear_graph(), angel::c_graph_t::dependents, independent_vertices_to_front(), angel::c_graph_t::next_edge_number, renumber_edges(), angel::c_graph_t::v(), angel::c_graph_t::X, angel::c_graph_t::x(), and angel::c_graph_t::y().

Here is the call graph for this function:

size_t angel::block_begin ( size_t  i,
size_t  p,
size_t  n 
)
inline

First index in ith of p blocks where overall size is n (indices 0..n-1)

Definition at line 904 of file angel_tools.hpp.

int angel::chooseEdgeElimRandomly ( std::vector< double > &  deltaE)

Definition at line 402 of file angel_tools.cpp.

References ECONST, and gen_prob().

Referenced by xaifBoosterCrossCountryInterface::computeEliminationSequenceRandom().

Here is the call graph for this function:

int angel::chooseEdgeElimRandomlyGreedy ( std::vector< double > &  deltaE)

Definition at line 432 of file angel_tools.cpp.

References ECONST, and gen_prob().

Here is the call graph for this function:

unsigned int angel::chooseTarget_sa ( std::vector< double > &  deltaE)

Randomly chooses an index into the vector deltaE.

Parameters
deltaEa vector of changes in energy. Normalized probabilities are calculated for each entry
See Also
gen_prob

Definition at line 356 of file angel_tools.cpp.

References ECONST, and gen_prob().

Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), and xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random().

Here is the call graph for this function:

void angel::close_log_file ( )
inline

Definition at line 476 of file angel_io.hpp.

References log_file.

template<typename Ad_graph_t >
void angel::common_predecessor ( typename Ad_graph_t::vertex_descriptor  v,
const Ad_graph_t &  adg,
typename std::vector< typename Ad_graph_t::vertex_descriptor > &  vec 
)
inline

Returns set of vertices (in vec) that have common predecessors with v.

Definition at line 271 of file angel_tools.hpp.

References unique_vector().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::common_successors ( typename Ad_graph_t::vertex_descriptor  v,
const Ad_graph_t &  adg,
typename std::vector< typename Ad_graph_t::vertex_descriptor > &  vec 
)
inline

Returns set of vertices (in vec) that have common successors with v.

Definition at line 239 of file angel_tools.hpp.

References unique_vector().

Here is the call graph for this function:

bool angel::convert_elimination_sequence ( const vector< c_graph_t::vertex_t > &  vv,
const c_graph_t &  cg,
vector< edge_ij_elim_t > &  ev 
)

Converts vertex elimination sequence into (mixed) edge elimination sequence.

Definition at line 462 of file eliminations.cpp.

References vertex_elimination().

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

Here is the call graph for this function:

bool angel::convert_elimination_sequence ( const vector< edge_ij_elim_t > &  ev,
const line_graph_t &  lg,
vector< triplet_t > &  tv 
)

Converts (mixed) edge elimination sequence into face elimination sequence.

Definition at line 480 of file eliminations.cpp.

References back_edge_elimination(), find_edge(), front_edge_elimination(), THROW_EXCEPT_MACRO, write_graph(), and write_vertex_property().

Here is the call graph for this function:

template<typename Ad_graph_t >
int angel::count_parallel_edges ( typename Ad_graph_t::edge_descriptor  e,
const Ad_graph_t &  g 
)
inline

Definition at line 393 of file angel_tools.hpp.

Referenced by markowitz_enlargement_front().

string_stream_output_t angel::cout_string_output ( std::cout  )
vis_display_output_t angel::cout_vis_display_output ( std::cout  )
template<typename Ad_graph_t >
std::pair<typename Ad_graph_t::edge_descriptor, bool> angel::edge ( typename Ad_graph_t::vertex_descriptor  u,
typename Ad_graph_t::vertex_descriptor  v,
const Ad_graph_t &  g 
)
inline
int angel::edge_elim_effect ( const edge_bool_t  be,
const c_graph_t &  angelLCG,
const AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel 
)

Definition at line 1133 of file heuristics.cpp.

References dependent, edge(), UNIT_EDGE, VARIABLE_EDGE, and vertex_type().

Here is the call graph for this function:

int angel::edge_elim_effect ( const EdgeElim  ee,
const c_graph_t &  angelLCG,
const AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel 
)

Definition at line 1221 of file heuristics.cpp.

References edge_elim_effect(), angel::EdgeElim::getE(), and angel::EdgeElim::isFront().

Here is the call graph for this function:

int angel::edge_elim_effect ( const edge_bool_t  be,
const c_graph_t &  angelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel 
)

Determines the effect, in terms of nontrivial edge count, of performing edge elimination be.

Parameters
beedge elimination target under consideration
angelLCGc-graph
ourAwarenessLevelsetting such as unit aware, constant aware, or no awareness
Returns
net effect on nontrivial edge count

Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), edge_elim_effect(), maintaining_edge_eliminations(), reducing_edge_eliminations(), and transformation_effect().

int angel::edge_elim_effect ( const EdgeElim  ee,
const c_graph_t &  angelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel 
)

Determines the effect, in terms of nontrivial edge count, of performing edge elimination ee.

Parameters
eeedge elimination target under consideration
angelLCGThe linearized computational graph
ourAwarenessLevelsetting such as unit aware, constant aware, or no awareness
Returns
net effect on nontrivial edge count
int angel::edge_elimination ( c_graph_t::edge_t  e,
bool  front,
c_graph_t &  cg 
)
inline

Front elimination of edge e from c-graph cg if front=true otherwise back eliminination

Returns
The costs (number of operation)

Definition at line 109 of file eliminations.hpp.

References back_edge_elimination(), and front_edge_elimination().

Referenced by edge_elimination(), and eliminate().

Here is the call graph for this function:

int angel::edge_elimination ( edge_bool_t  e,
c_graph_t &  cg 
)
inline

Front elimination of edge e.first from c-graph cg if e.second=true otherwise back eliminination

Returns
The costs (number of operation)

Definition at line 118 of file eliminations.hpp.

References back_edge_elimination(), and front_edge_elimination().

Here is the call graph for this function:

int angel::edge_elimination ( c_graph_t::vertex_t  i,
c_graph_t::vertex_t  j,
bool  front,
c_graph_t &  cg 
)
inline

Front elimination of edge from vertex i to vertex j from c-graph cg if front=true otherwise back eliminination

Returns
The costs (number of operation)

Definition at line 127 of file eliminations.hpp.

References back_edge_elimination(), and front_edge_elimination().

Here is the call graph for this function:

int angel::edge_elimination ( int  i,
int  j,
bool  front,
c_graph_t &  cg 
)
inline

Front elimination of edge from vertex with number i to vertex with number j from c-graph cg if front=true otherwise back eliminination

Returns
The costs (number of operation)

Definition at line 138 of file eliminations.hpp.

References back_edge_elimination(), and front_edge_elimination().

Here is the call graph for this function:

int angel::edge_elimination ( edge_ij_elim_t  ee,
c_graph_t &  cg 
)
inline

Edge elimination specified by ee.

Definition at line 144 of file eliminations.hpp.

References edge_elimination(), angel::edge_ij_elim_t::front, angel::edge_ij_elim_t::i, and angel::edge_ij_elim_t::j.

Here is the call graph for this function:

int angel::edge_elimination ( const edge_elim_seq_t &  seq,
c_graph_t &  cg 
)
inline

Eliminate sequence seq of edges from c-graph cg

Returns
The costs (number of operation)

Definition at line 161 of file eliminations.hpp.

References edge(), and edge_elimination().

Here is the call graph for this function:

int angel::edge_elimination ( const edge_pair_elim_seq_t &  seq,
c_graph_t &  cg 
)
inline

Eliminate sequence seq of edges from c-graph cg

Returns
The costs (number of operation)

Definition at line 171 of file eliminations.hpp.

References edge_elimination().

Here is the call graph for this function:

int angel::edge_elimination ( const edge_ij_elim_seq_t &  seq,
c_graph_t &  cg 
)
inline

Eliminate sequence seq of edges from c-graph cg

Returns
The costs (number of operation)

Definition at line 181 of file eliminations.hpp.

References edge_elimination().

Here is the call graph for this function:

int angel::edge_elimination ( int  i,
int  j,
bool  front,
line_graph_t &  lg 
)
inline

Front elimination of edge from vertex i to vertex j from line graph lg if front=true otherwise back eliminination

Definition at line 237 of file eliminations.hpp.

References back_edge_elimination(), and front_edge_elimination().

Here is the call graph for this function:

int angel::edge_elimination ( line_graph_t::edge_t  vij,
bool  front,
line_graph_t &  lg 
)
inline

Front elimination of edge vij from line graph lg if front=true otherwise back eliminination.

Definition at line 243 of file eliminations.hpp.

References back_edge_elimination(), and front_edge_elimination().

Here is the call graph for this function:

int angel::edge_elimination ( const edge_vertex_elim_seq_t &  seq,
line_graph_t &  lg 
)
inline

Eliminate sequence seq of edges from line graph lg.

Definition at line 267 of file eliminations.hpp.

References edge(), and edge_elimination().

Here is the call graph for this function:

void angel::edge_vertex_name ( line_graph_t::edge_t  e,
const line_graph_t &  lg,
int &  i,
int &  j 
)
inline

Vertex pair representation of an edge in line graph.

Parameters
eEdge from line graph
lgLine graph
iVertex number of edge source in c-graph (output)
jVertex number of edge target in c-graph (output)

Definition at line 411 of file angel_types.hpp.

Referenced by angel::new_pik_t::operator()(), and angel::new_iks_t::operator()().

int angel::eliminatable_edges ( const c_graph_t &  cg,
std::vector< c_graph_t::edge_t > &  ev 
)

Definition at line 371 of file eliminations.cpp.

int angel::eliminatable_edges ( const c_graph_t &  cg,
std::vector< edge_bool_t > &  ev 
)

Definition at line 403 of file eliminations.cpp.

References dependent, independent, and vertex_type().

Here is the call graph for this function:

int angel::eliminatable_edges ( const c_graph_t &  cg,
std::vector< edge_ij_elim_t > &  ev 
)

Definition at line 418 of file eliminations.cpp.

References dependent, angel::edge_ij_elim_t::front, independent, and vertex_type().

Here is the call graph for this function:

unsigned int angel::eliminatable_edges ( const c_graph_t &  cg,
std::vector< EdgeElim > &  ev 
)

Definition at line 434 of file eliminations.cpp.

References dependent, independent, and vertex_type().

Here is the call graph for this function:

int angel::eliminatable_edges ( const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev 
)
int angel::eliminatable_edges ( const c_graph_t &  cg,
vector< edge_bool_t > &  ev 
)

Returns a set of edges that can be eliminated from c-graph cg and how.

It copies the edges into a vector and distiguishes which edge can be front, (i.e. pair(e,true)) and which can be back-eliminated, i.e. pair(e,true). Edges can appear twice in the vector.

int angel::eliminatable_edges ( const c_graph_t &  cg,
vector< edge_ij_elim_t > &  ev 
)

Returns a set of edges that can be eliminated from c-graph cg and how.

It copies the edges into a vector and distiguishes which edge can be front, (i.e. (i,j,true)) and which can be back-eliminated, i.e. (i,j,true). Edges can appear twice in the vector.

unsigned int angel::eliminatable_edges ( const c_graph_t &  cg,
vector< EdgeElim > &  ev 
)

Returns a set of edges that can be eliminated from c-graph cg.

int angel::eliminatable_faces ( const line_graph_t &  lg,
std::vector< line_graph_t::face_t > &  fv 
)

Definition at line 449 of file eliminations.cpp.

References dependent, independent, and vertex_type().

Here is the call graph for this function:

int angel::eliminatable_faces ( const line_graph_t &  lg,
vector< line_graph_t::face_t > &  fv 
)

Returns a set of faces that can be eliminated from line graph lg.

Referenced by eliminatable_objects(), and eliminatable_triplets().

int angel::eliminatable_objects ( const c_graph_t &  cg,
vector< c_graph_t::vertex_t > &  vv 
)
inline
int angel::eliminatable_objects ( const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev 
)
inline

Synonym of eliminatable_edges for usage in templates.

See Also
use_heuristics

Definition at line 546 of file eliminations.hpp.

References eliminatable_edges().

Here is the call graph for this function:

int angel::eliminatable_objects ( const c_graph_t &  cg,
vector< edge_bool_t > &  ev 
)
inline

Synonym of eliminatable_edges for usage in templates.

See Also
use_heuristics

Definition at line 552 of file eliminations.hpp.

References eliminatable_edges().

Here is the call graph for this function:

int angel::eliminatable_objects ( const c_graph_t &  cg,
vector< edge_ij_elim_t > &  ev 
)
inline

Synonym of eliminatable_edges for usage in templates.

See Also
use_heuristics

Definition at line 558 of file eliminations.hpp.

References eliminatable_edges().

Here is the call graph for this function:

int angel::eliminatable_objects ( const line_graph_t &  lg,
vector< line_graph_t::face_t > &  fv 
)
inline

Synonym of eliminatable_faces for usage in templates.

See Also
use_heuristics

Definition at line 564 of file eliminations.hpp.

References eliminatable_faces().

Here is the call graph for this function:

int angel::eliminatable_objects ( const line_graph_t &  lg,
vector< triplet_t > &  tv 
)
inline

Synonym of eliminatable_triplets for usage in templates.

See Also
use_heuristics

Definition at line 570 of file eliminations.hpp.

References eliminatable_triplets().

Here is the call graph for this function:

int angel::eliminatable_triplets ( const line_graph_t &  lg,
vector< triplet_t > &  tv 
)
inline

Returns a set of eliminatable faces as triplets tv from line graph lg.

The first and second value of each triplet gives the face and the third is -1. Thus there is no more information than eliminatable_faces but vectors of triplets can be used in situations where vectors of faces cannot.

Definition at line 525 of file eliminations.hpp.

References eliminatable_faces().

Referenced by eliminatable_objects().

Here is the call graph for this function:

int angel::eliminatable_vertices ( const c_graph_t &  cg,
vector< c_graph_t::vertex_t > &  vv 
)

Returns a set of vertices that can be eliminated from c-graph cg.

Definition at line 350 of file eliminations.cpp.

References intermediate, and angel::c_graph_t::vertex_type().

Referenced by eliminatable_objects().

Here is the call graph for this function:

int angel::eliminate ( int  j,
c_graph_t &  cg 
)
inline

Overloaded elimination for templates, here vertex elimination in c-graph.

Definition at line 426 of file eliminations.hpp.

References vertex_elimination().

Here is the call graph for this function:

int angel::eliminate ( int  j,
line_graph_t &  lg 
)
inline

Overloaded elimination for templates, here vertex elimination in line graph.

Definition at line 430 of file eliminations.hpp.

References vertex_elimination().

Here is the call graph for this function:

int angel::eliminate ( edge_bool_t  e,
c_graph_t &  cg 
)
inline

Overloaded elimination for templates, here vertex elimination in c-graph.

Definition at line 434 of file eliminations.hpp.

References edge_elimination().

Here is the call graph for this function:

int angel::eliminate ( edge_ij_elim_t  ee,
c_graph_t &  cg 
)
inline

Overloaded elimination for templates, here vertex elimination in c-graph.

Definition at line 439 of file eliminations.hpp.

References edge_elimination().

Here is the call graph for this function:

int angel::eliminate ( line_graph_t::face_t  f,
line_graph_t &  lg 
)
inline

Overloaded elimination for templates, here face elimination in line graph

Returns
The costs, not the resulting line graph node.

Therefore, it can be used in template use_heuristic.

Definition at line 448 of file eliminations.hpp.

References face_elimination(), and was_non_trivial_elimination().

Here is the call graph for this function:

int angel::eliminate ( triplet_t &  t,
line_graph_t &  lg 
)
inline

Overloaded elimination for templates, here face elimination in line graph

Returns
The elimination costs.

Therefore, it can be used in template use_heuristic. Since the inserted/absorbing node is overwritten in t it can be used in elimination_history_t too.

Definition at line 460 of file eliminations.hpp.

References face_elimination().

Here is the call graph for this function:

int angel::face_elimination ( line_graph_t::face_t  f,
int  kr,
line_graph_t &  lg,
accu_graph_t &  ac 
)

Eliminate face f from line graph lg

Parameters
fthe face
kris a request for the number of a new node or the number of the absorbing the face, i.e. if face elimination inserts a new node into lg it should be number with kr and if a new node is immediately absorbed by some node k then it should be k = kr. If the request cannot be satisfied the face is not eliminated. kr = -1 means no request.
lgthe line graph
acis a container for graphs representing the accumulation code
Returns
The number of node inserted or where the absorption took place.

Definition at line 238 of file eliminations.cpp.

References angel::accu_graph_t::accu_exp, angel::accu_exp_t::add, angel::line_graph_t::cons_ok, angel::accu_graph_t::exp_nr, angel::accu_exp_t::mult, remove_irrelevant_edges(), remove_unreachable_edges(), same_neighbors(), same_predecessors(), same_successors(), sorted_predecessor_set(), sorted_successor_set(), THROW_DEBUG_EXCEPT_MACRO, and angel::line_graph_t::v().

Referenced by back_edge_elimination(), xaifBoosterCrossCountryInterface::compute_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_elimination_sequence_lsa_face(), xaifBoosterCrossCountryInterface::compute_elimination_sequence_lsa_vertex(), eliminate(), face_elimination(), front_edge_elimination(), angel::momrf_op_t::operator()(), and vertex_elimination().

Here is the call graph for this function:

int angel::face_elimination ( line_graph_t::face_t  f,
int  kr,
line_graph_t &  lg 
)
inline

Eliminate face f from line graph lg

Parameters
fthe face
kris a request for the number of a new node or the number of the node absorbing the face, i.e. if face elimination inserts a new node into lg it should be number with kr and if a new node is immediately absorbed by some node k then it should be k = kr. If the request cannot be satisfied the face is not eliminated. kr = -1 means no request.
lgthe line graph
Returns
The number of node inserted or where the absorption took place.

Definition at line 305 of file eliminations.hpp.

References angel::line_graph_t::cgp, and face_elimination().

Here is the call graph for this function:

int angel::face_elimination ( line_graph_t::face_t  f,
line_graph_t &  lg 
)
inline

Eliminate face f from line graph lg

Returns
The number of node inserted or where the absorption took place.

Definition at line 312 of file eliminations.hpp.

References face_elimination().

Here is the call graph for this function:

int angel::face_elimination ( int  i,
int  j,
line_graph_t &  lg 
)
inline

Eliminate face from line graph

Parameters
inode number of the source of the face
jnode number of the source of the face
lgthe line graph
Returns
The number of node inserted or where the absorption took place.

Definition at line 321 of file eliminations.hpp.

References edge(), and face_elimination().

Here is the call graph for this function:

int angel::face_elimination ( int  i,
int  j,
int  kr,
line_graph_t &  lg 
)
inline

Eliminate face from line graph

Parameters
inode number of the source of the face
jnode number of the source of the face
kris a request for the number of a new node or the number of the node absorbing the face, i.e. if face elimination inserts a new node into lg it should be number with kr and if a new node is immediately absorbed by some node k then it should be k = kr. If the request cannot be satisfied the face is not eliminated. kr = -1 means no request.
lgthe line graph
Returns
The number of node inserted or where the absorption took place.

Definition at line 340 of file eliminations.hpp.

References edge(), and face_elimination().

Here is the call graph for this function:

int angel::face_elimination ( int  i,
int  j,
int  kr,
line_graph_t &  lg,
accu_graph_t &  ac 
)
inline

Definition at line 346 of file eliminations.hpp.

References edge(), and face_elimination().

Here is the call graph for this function:

int angel::face_elimination ( triplet_t &  t,
line_graph_t &  lg 
)
inline

Eliminate face from line graph

Parameters
ta triplet of node number (i, j, kr), for meaning of kr see parameter lists of other face elimination functions
lgthe line graph
Returns
Whether a face was eliminated, i.e. the elimination costs.

The third parameter of t is overwritten if the elimination was successful. So the information on both the resulting node and the elimination costs are provided.

Definition at line 361 of file eliminations.hpp.

References face_elimination(), angel::triplet_t::i, angel::triplet_t::j, and angel::triplet_t::k.

Here is the call graph for this function:

int angel::face_elimination ( triplet_t &  t,
line_graph_t &  lg,
accu_graph_t &  ac 
)
inline

Eliminate face from line graph

Parameters
ta triplet of node number (i, j, kr), for meaning of kr see parameter lists of other face elimination functions
lgthe line graph
acis a container for graphs representing the accumulation code
Returns
Whether a face was eliminated, i.e. the elimination costs.

The third parameter of t is overwritten if the elimination was successful. So the information on both the resulting node and the elimination costs are provided. We found that this version is the most convenient for general-purpose usage, e.g. stochastic algorithms.

Definition at line 378 of file eliminations.hpp.

References face_elimination(), angel::triplet_t::i, angel::triplet_t::j, and angel::triplet_t::k.

Here is the call graph for this function:

void angel::face_vertex_name ( line_graph_t::face_t  f,
const line_graph_t &  lg,
int &  i,
int &  j,
int &  k 
)
inline

Vertex triplet representation of a face.

Parameters
fface
lgLine graph
iVertex number of face source in c-graph (output)
jVertex number of face center in c-graph (output)
kVertex number of face target in c-graph (output)

Definition at line 425 of file angel_types.hpp.

References THROW_DEBUG_EXCEPT_MACRO.

Referenced by fmf_obj(), angel::lmf_op_t::operator()(), angel::momrf_op_t::operator()(), and angel::distf_op_t::operator()().

int angel::fill_in_back ( c_graph_t::edge_t  e,
const c_graph_t &  cg 
)
inline

Definition at line 639 of file heuristics.cpp.

References new_in_edges().

Referenced by lowest_fill_in_edge_f().

Here is the call graph for this function:

int angel::fill_in_front ( c_graph_t::edge_t  e,
const c_graph_t &  cg 
)
inline

Definition at line 635 of file heuristics.cpp.

References new_out_edges().

Referenced by lowest_fill_in_edge_f().

Here is the call graph for this function:

template<class Object_t , class Ad_graph_t , class Op_t >
int angel::find_best_subset ( const vector< Object_t > &  v1,
const Ad_graph_t &  adg,
vector< Object_t > &  v2,
Op_t  op,
bool  maximize 
)

Find best subset of v1 w.r.t. op, skeleton for new heuristics.

Definition at line 1344 of file heuristics.hpp.

bool angel::find_edge ( int  s,
int  t,
const line_graph_t &  lg,
std::vector< line_graph_t::edge_t > &  ev 
)
inline

Searches an edge in line graph that corresponds to (s,t)

Definition at line 584 of file angel_tools.hpp.

Referenced by back_edge_elimination(), convert_elimination_sequence(), and front_edge_elimination().

double angel::fme_obj ( edge_bool_t  eb,
const c_graph_t &  cg 
)
inline

Definition at line 475 of file heuristics.cpp.

References edge(), and angel::c_graph_t::x().

Referenced by angel::forward_mode_edge_t::operator()().

Here is the call graph for this function:

double angel::fmf_obj ( line_graph_t::face_t  f,
const line_graph_t &  lg 
)
inline

Definition at line 883 of file heuristics.cpp.

References face_vertex_name(), and angel::line_graph_t::x().

Referenced by angel::forward_mode_face_t::operator()(), and angel::reverse_mode_face_t::operator()().

Here is the call graph for this function:

template<typename Ad_graph_t , typename Op_t >
void angel::for_all_edges ( Ad_graph_t &  adg,
const Op_t &  op 
)
inline

Applies op to all edges of adg, graph can be changed.

Definition at line 119 of file angel_tools.hpp.

Referenced by write_graph_eliad().

template<typename Ad_graph_t , typename Op_t >
void angel::for_all_edges ( const Ad_graph_t &  adg,
Op_t &  op 
)
inline

Applies op to all edges of adg, op can be changed, e.g. for outputs.

Definition at line 127 of file angel_tools.hpp.

template<typename Ad_graph_t , typename Op_t >
void angel::for_all_in_edges ( typename Ad_graph_t::vertex_descriptor  v,
Ad_graph_t &  adg,
const Op_t &  op 
)
inline

Applies op to all in-edges of v, graph can be changed.

Definition at line 135 of file angel_tools.hpp.

template<typename Ad_graph_t , typename Op_t >
void angel::for_all_out_edges ( typename Ad_graph_t::vertex_descriptor  v,
Ad_graph_t &  adg,
const Op_t &  op 
)
inline

Applies op to all out-edges of v, graph can be changed.

Definition at line 144 of file angel_tools.hpp.

int angel::forward_mode_edge_back ( const vector< c_graph_t::edge_t > &  ev1,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)
inline

Forward mode in back edge elimination.

Parameters
ev1Set of edges that can be eliminated
cgc-graph
ev2Result vector of edges, contains lowest edge in lexicographical order
Returns
Size of ev2, always 1 (if ev1 is not empty)

Edges in ev1 that cannot be back eliminated are ignored. It is NOT equivalent to forward mode in vertex and face elimination.

Definition at line 324 of file heuristics.hpp.

References forward_mode_edge_f().

Here is the call graph for this function:

int angel::forward_mode_edge_f ( const vector< c_graph_t::edge_t > &  ev1,
bool  front,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)

Forward mode in edge elimination.

Parameters
ev1Set of edges that can be eliminated
frontUsed for front elimination if true, otherwise for back elimination
cgc-graph
ev2Result vector of edges, contains lowest edge in lexicographical order
Returns
Size of ev2, always 1 (if ev1 is not empty)

This function is intended for elimination sequences that are either completely front or completely back eliminations. For mixed sequences use int forward_mode_edge (const vector<pair<c_graph_t::edge_t,bool> >& ev1, const c_graph_t& cg, vector<pair<c_graph_t::edge_t,bool> >& ev2).

Definition at line 457 of file heuristics.cpp.

References inv_lex_less(), and lex_less().

Referenced by forward_mode_edge_back(), and forward_mode_edge_front().

Here is the call graph for this function:

int angel::forward_mode_edge_front ( const vector< c_graph_t::edge_t > &  ev1,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)
inline

Forward mode in front edge elimination.

Parameters
ev1Set of edges that can be eliminated
cgc-graph
ev2Result vector of edges, contains lowest edge in lexicographical order
Returns
Size of ev2, always 1 (if ev1 is not empty)

Edges in ev1 that cannot be front eliminated are ignored. It is equivalent to forward mode in vertex and face elimination when forward mode is used as sole criterion.

Definition at line 309 of file heuristics.hpp.

References forward_mode_edge_f().

Here is the call graph for this function:

int angel::front_edge_elimination ( c_graph_t::edge_t  e,
c_graph_t &  cg 
)

Front elimination of edge e from c-graph cg

Returns
The costs (number of operation)

Definition at line 46 of file eliminations.cpp.

References CONSTANT_EDGE, dependent, edge(), angel::c_graph_t::next_edge_number, UNIT_EDGE, VARIABLE_EDGE, and angel::c_graph_t::vertex_type().

Referenced by convert_elimination_sequence(), edge_elimination(), front_edge_elimination(), momr_edge_front(), and remove_trivial_edges().

Here is the call graph for this function:

int angel::front_edge_elimination ( c_graph_t::vertex_t  i,
c_graph_t::vertex_t  j,
c_graph_t &  cg 
)
inline

Front elimination of edge from vertex i to vertex j from c-graph cg

Returns
The costs (number of operation)

Definition at line 62 of file eliminations.hpp.

References edge(), and front_edge_elimination().

Here is the call graph for this function:

int angel::front_edge_elimination ( int  i,
int  j,
c_graph_t &  cg 
)
inline

Front elimination of edge from vertex with number i to vertex with number j from c-graph cg

Returns
The costs (number of operation)

Definition at line 76 of file eliminations.hpp.

References front_edge_elimination().

Here is the call graph for this function:

int angel::front_edge_elimination ( int  i,
int  j,
line_graph_t &  lg 
)

Front eliminate edge from vertex with number i to vertex number j in line graph lg

All faces (i,j,*) are eliminated

Definition at line 187 of file eliminations.cpp.

References find_edge(), and front_edge_elimination().

Here is the call graph for this function:

int angel::front_edge_elimination ( line_graph_t::edge_t  vij,
line_graph_t &  lg 
)

Front eliminate edge vij in line graph lg

All faces (i,j,*) are eliminated

Definition at line 197 of file eliminations.cpp.

References face_elimination().

Here is the call graph for this function:

unsigned int angel::front_elim ( c_graph_t::edge_t  e,
c_graph_t &  angelLCG,
const elimSeq_cost_t &  currentElimSeq,
refillDependenceMap_t &  refillDependences 
)
int angel::front_eliminatable_edges ( const c_graph_t &  cg,
std::vector< c_graph_t::edge_t > &  ev 
)

Definition at line 381 of file eliminations.cpp.

References dependent, and vertex_type().

Here is the call graph for this function:

int angel::front_eliminatable_edges ( const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev 
)

Returns a set of edges that can be front eliminated from c-graph cg.

unsigned int angel::front_eliminate_edge_directly ( c_graph_t::edge_t  e,
c_graph_t &  angelLCG,
list< EdgeRef_t > &  edge_ref_list,
xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionList &  jae_list 
)

Front eliminate an edge from an angel c_graph_t but go directly to a xaifBoosterCrossCountryInterface::JacobianAccumulationExpression, rather than the internal angel accumulation graph type.

Parameters
ethe edge that will be front eliminated.
angelLCGthe c_graph_t (passed by reference) that the elimination is performed on.
edge_ref_listthe stl list container that keeps track of the reference (LCG pointer or JAE pointer) for each edge in angelLCG.
jae_listthe xaifBooster JAE list that we construct incrementally as we perform eliminations.
Returns
The cost (in terms of multiplications) of the elimination.

This function is also aware of unit and constant edges. This entails labeling new edges with the appropriate type, as well as determining the cost appropriately.

Definition at line 673 of file eliminations.cpp.

References multiply_edge_pair_directly(), and removeRef().

Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random(), xaifBoosterCrossCountryInterface::computeEliminationSequenceRandom(), and postProcessRemainderGraph().

Here is the call graph for this function:

unsigned int angel::frontEdgeElimination_noJAE ( c_graph_t::edge_t  e,
c_graph_t &  angelLCG,
const transformationSeq_cost_t *  currentTransformationSequence,
refillDependenceMap_t &  refillDependences 
)
template<class Object_t , class Neighbor_t , class Cost_t >
int angel::FTSA ( Object_t &  object,
Neighbor_t  neighbor,
Cost_t  costs,
double  t,
int  max_iter 
)
inline

Metropolis with fixed temperature in a general form.

Parameters
objectSome state in the configuration space.
neighborNeighborhood relation applicable to object
costsCost operator applicable to object
ttemperature
max_iterMaximal number of iterations

Object_t, Neighbor_t and Cost_t can be arbitrary as long as their objects can allow to execute neighbor (object) with change of object and to execute cost (object) where object can be const and an int-compatible value is returned.

Note
At the moment there are only applications with face_elimination_history_t as Object_t.

Definition at line 125 of file sa.hpp.

References SA().

Here is the call graph for this function:

double angel::gen_prob ( )

Returns a random number between zero and one.

See Also
chooseTarget_sa

Definition at line 349 of file angel_tools.cpp.

Referenced by chooseEdgeElimRandomly(), chooseEdgeElimRandomlyGreedy(), and chooseTarget_sa().

c_graph_t::edge_t angel::getEdge ( unsigned int  i,
unsigned int  j,
const c_graph_t &  angelLCG 
)

Returns the edge in angelLCG that has source i and target j.

Definition at line 68 of file angel_tools.cpp.

References edge(), and THROW_EXCEPT_MACRO.

Referenced by angel::EdgeElim::getBool(), angel::EdgeElim::getE(), angel::Rerouting::getE(), and angel::Rerouting::getPivotE().

Here is the call graph for this function:

xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionVertex * angel::getJAE_p ( const c_graph_t::edge_t  e,
const c_graph_t &  angelLCG,
const list< EdgeRef_t > &  edge_ref_list 
)

Definition at line 572 of file eliminations.cpp.

References THROW_EXCEPT_MACRO.

Referenced by populate_remainderGraph_and_correlationLists(), and setJaevRef().

const xaifBoosterCrossCountryInterface::LinearizedComputationalGraphEdge * angel::getLCG_p ( const c_graph_t::edge_t  e,
const c_graph_t &  angelLCG,
const list< EdgeRef_t > &  edge_ref_list 
)

Definition at line 559 of file eliminations.cpp.

References THROW_EXCEPT_MACRO.

Referenced by populate_remainderGraph_and_correlationLists(), and setJaevRef().

EdgeRefType_E angel::getRefType ( const c_graph_t::edge_t  e,
const c_graph_t &  angelLCG,
const list< EdgeRef_t > &  edge_ref_list 
)

Definition at line 548 of file eliminations.cpp.

References THROW_EXCEPT_MACRO, and UNDEFINED.

Referenced by populate_remainderGraph_and_correlationLists(), and setJaevRef().

void angel::in_out_path_lengths ( const c_graph_t &  cg,
std::vector< int > &  vni,
std::vector< int > &  vli,
std::vector< int > &  vno,
std::vector< int > &  vlo 
)

Returns for each vertex the number of paths and their overall length.

Parameters
cgc-graph
vniNumber of all incoming paths for each vertex
vliOverall path length of all incoming paths for each vertex
vnoNumber of all outgoing paths for each vertex
vloOverall path length of all outgoing paths for each vertex
Note
Function is not implemented for line graphs because there is no application (now).

Definition at line 103 of file angel_tools.cpp.

References angel::c_graph_t::x().

Referenced by moplr_edge(), and angel::oplrv_op_t::oplrv_op_t().

Here is the call graph for this function:

void angel::independent_vertices_to_front ( const c_graph_t &  gin,
const vector< c_graph_t::vertex_t > &  indeps,
c_graph_t &  gout 
)

Definition at line 234 of file angel_tools.cpp.

References permutate_vertices(), THROW_EXCEPT_MACRO, angel::c_graph_t::v(), and angel::c_graph_t::x().

Here is the call graph for this function:

void angel::independent_vertices_to_front ( const c_graph_t &  gin,
const std::vector< c_graph_t::vertex_t > &  indeps,
c_graph_t &  gout 
)

Independent vertices, given by indeps, becomes first vertices in gout.

Referenced by block2loop(), and read_graph_eliad().

bool angel::inv_lex_greater ( c_graph_t::edge_t  e1,
c_graph_t::edge_t  e2,
const c_graph_t &  cg 
)
inline

Returns whether e1 is lexicographically greater than e2 w.r.t. target and source.

Definition at line 433 of file angel_tools.hpp.

Referenced by reverse_mode_edge_f().

bool angel::inv_lex_less ( c_graph_t::edge_t  e1,
c_graph_t::edge_t  e2,
const c_graph_t &  cg 
)
inline

Returns whether e1 is lexicographically less than e2 w.r.t. target and source.

Definition at line 442 of file angel_tools.hpp.

Referenced by forward_mode_edge_f().

bool angel::is_bipartite ( const c_graph_t &  cg)
inline

Tests if cg is bi-partite.

Definition at line 599 of file angel_tools.hpp.

References dependent, independent, and vertex_type().

Here is the call graph for this function:

bool angel::is_tripartite ( const line_graph_t &  lg)
inline

Tests if lg is tri-partite.

Definition at line 609 of file angel_tools.hpp.

References dependent, independent, and vertex_type().

Here is the call graph for this function:

bool angel::isTrivialEdge ( const c_graph_t::edge_t e,
c_graph_t theAngelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel 
)

simply returns true if anf only if e is considered trivial with respect to ourAwarenessLevel

Definition at line 446 of file xaif_interface.cpp.

References THROW_EXCEPT_MACRO, UNIT_EDGE, and VARIABLE_EDGE.

Referenced by assessBackEdgeElim(), assessEdgeElim(), and assessFrontEdgeElim().

bool angel::lex_greater ( c_graph_t::edge_t  e1,
c_graph_t::edge_t  e2,
const c_graph_t &  cg 
)
inline

Returns whether e1 is lexicographically greater than e2 w.r.t. source and target.

Definition at line 413 of file angel_tools.hpp.

Referenced by angel::reverse_mode_edge_t::operator()(), and reverse_mode_edge_f().

bool angel::lex_greater ( edge_bool_t  eb1,
edge_bool_t  eb2,
const c_graph_t &  cg 
)
inline

Definition at line 450 of file angel_tools.hpp.

bool angel::lex_less ( c_graph_t::edge_t  e1,
c_graph_t::edge_t  e2,
const c_graph_t &  cg 
)
inline

Returns whether e1 is lexicographically less than e2 w.r.t. source and target.

Definition at line 423 of file angel_tools.hpp.

Referenced by forward_mode_edge_f(), and angel::forward_mode_edge_t::operator()().

bool angel::lex_less ( edge_bool_t  eb1,
edge_bool_t  eb2,
const c_graph_t &  cg 
)
inline

Definition at line 468 of file angel_tools.hpp.

bool angel::lex_less_face ( line_graph_t::face_t  e1,
line_graph_t::face_t  e2,
const line_graph_t &  lg 
)
lmmd_edge_t angel::lmmd_edge ( 1.  0)
int angel::lmmd_edge_back ( c_graph_t::edge_t  e,
double  w,
const c_graph_t &  cg 
)
inline

Definition at line 682 of file heuristics.cpp.

References markowitz_enlargement_back(), and sum_over_all_in_edges().

Referenced by angel::lmmde_op_t::operator()().

Here is the call graph for this function:

int angel::lmmd_edge_front ( c_graph_t::edge_t  e,
double  w,
const c_graph_t &  cg 
)
inline

Definition at line 674 of file heuristics.cpp.

References markowitz_enlargement_front(), and sum_over_all_out_edges().

Referenced by angel::lmmde_op_t::operator()().

Here is the call graph for this function:

lmmd_vertex_t angel::lmmd_vertex ( 1.  0)
int angel::lowest_fill_in_edge_back ( const vector< c_graph_t::edge_t > &  ev1,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)
inline

Lowest fill-in in back edge elimination.

Parameters
ev1Set of edges that can be eliminated
cgc-graph
ev2Result vector of edges with lowest fill-in
Returns
Size of ev2

Edges in ev1 that cannot be back eliminated are ignored.

Definition at line 633 of file heuristics.hpp.

References lowest_fill_in_edge_f().

Here is the call graph for this function:

int angel::lowest_fill_in_edge_f ( const vector< c_graph_t::edge_t > &  ev1,
bool  front,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)

Lowest Fill-in in edge elimination.

Parameters
ev1Set of edges that can be eliminated
frontUsed for front elimination if true, otherwise for back elimination
cgc-graph
ev2Result vector of edges with lowest fill-in
Returns
Size of ev2

This function is intended for elimination sequences that are either completely front or completely back eliminations. For mixed sequences use Note that fill-in by an edge's elimination can be different for front and back elimination.

Definition at line 644 of file heuristics.cpp.

References fill_in_back(), and fill_in_front().

Referenced by lowest_fill_in_edge_back(), and lowest_fill_in_edge_front().

Here is the call graph for this function:

int angel::lowest_fill_in_edge_front ( const vector< c_graph_t::edge_t > &  ev1,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)
inline

Lowest fill-in in front edge elimination.

Parameters
ev1Set of edges that can be eliminated
cgc-graph
ev2Result vector of edges with lowest fill-in
Returns
Size of ev2

Edges in ev1 that cannot be front eliminated are ignored.

Definition at line 619 of file heuristics.hpp.

References lowest_fill_in_edge_f().

Here is the call graph for this function:

int angel::lowest_markowitz_edge_back ( const vector< c_graph_t::edge_t > &  ev1,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)
inline

Lowest Markowitz in back edge elimination.

Parameters
ev1Set of edges that can be eliminated
cgc-graph
ev2Result vector of edges with lowest Markowitz degree
Returns
Size of ev2

Edges in ev1 that cannot be back eliminated are ignored.

Definition at line 485 of file heuristics.hpp.

References lowest_markowitz_edge_f().

Here is the call graph for this function:

int angel::lowest_markowitz_edge_f ( const vector< c_graph_t::edge_t > &  ev1,
bool  front,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)

Lowest Markowitz in edge elimination.

Parameters
ev1Set of edges that can be eliminated
frontUsed for front elimination if true, otherwise for back elimination
cgc-graph
ev2Result vector of edges with lowest Markowitz degree
Returns
Size of ev2

This function is intended for elimination sequences that are either completely front or completely back eliminations. For mixed sequences use int lowest_markowitz_edge (const vector<edge_bool_t>& ev1, const c_graph_t& cg, vector<edge_bool_t>& ev2). Note that Markowitz degree of an edge can be different for front and back elimination.

Definition at line 562 of file heuristics.cpp.

Referenced by lowest_markowitz_edge_back(), and lowest_markowitz_edge_front().

int angel::lowest_markowitz_edge_front ( const vector< c_graph_t::edge_t > &  ev1,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)
inline

Lowest Markowitz in front edge elimination.

Parameters
ev1Set of edges that can be eliminated
cgc-graph
ev2Result vector of edges with lowest Markowitz degree
Returns
Size of ev2

Edges in ev1 that cannot be front eliminated are ignored.

Definition at line 470 of file heuristics.hpp.

References lowest_markowitz_edge_f().

Here is the call graph for this function:

bool angel::lowest_markowitz_transformations ( const vector< Transformation > &  tv,
const c_graph_t &  angelLCG,
vector< Transformation > &  lowestMarkowitzTransformationsV 
)

Filter that populates /p lowestMarkowitzTransformationsV with those edge eliminations that have the lowest markowitz degree. Any reroutings are passed straight through.

Definition at line 1931 of file heuristics.cpp.

References lowestMarkowitzEdgeElim().

Referenced by xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence().

Here is the call graph for this function:

int angel::lowest_relative_markowitz_edge_back ( const vector< c_graph_t::edge_t > &  ev1,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)
inline

Lowest relative Markowitz in back edge elimination.

Parameters
ev1Set of edges that can be eliminated
cgc-graph
ev2Result vector of edges with lowest relative Markowitz degree
Returns
Size of ev2

Edges in ev1 that cannot be back eliminated are ignored.

Definition at line 560 of file heuristics.hpp.

References lowest_relative_markowitz_edge_f().

Here is the call graph for this function:

int angel::lowest_relative_markowitz_edge_f ( const vector< c_graph_t::edge_t > &  ev1,
bool  front,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)

Lowest relative Markowitz in edge elimination.

Parameters
ev1Set of edges that can be eliminated
frontUsed for front elimination if true, otherwise for back elimination
cgc-graph
ev2Result vector of edges with lowest relative Markowitz degree
Returns
Size of ev2

This function is intended for elimination sequences that are either completely front or completely back eliminations. For mixed sequences use int lowest_relative_markowitz_edge (const vector<edge_bool_t>& ev1, const c_graph_t& cg, vector<edge_bool_t>& ev2). Note that the relative Markowitz degree of an edge can be different for front and back elimination.

Definition at line 604 of file heuristics.cpp.

Referenced by lowest_relative_markowitz_edge_back(), and lowest_relative_markowitz_edge_front().

int angel::lowest_relative_markowitz_edge_front ( const vector< c_graph_t::edge_t > &  ev1,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)
inline

Lowest relative Markowitz in front edge elimination.

Parameters
ev1Set of edges that can be eliminated
cgc-graph
ev2Result vector of edges with lowest relative Markowitz degree
Returns
Size of ev2

Edges in ev1 that cannot be front eliminated are ignored.

Definition at line 546 of file heuristics.hpp.

References lowest_relative_markowitz_edge_f().

Here is the call graph for this function:

unsigned int angel::lowestMarkowitzEdgeElim ( const vector< EdgeElim > &  inEEV,
const c_graph_t &  angelLCG,
vector< EdgeElim > &  outEEV 
)
template<class Object_t , class Neighbor_t , class Cost_t >
int angel::LSA ( Object_t &  object,
Neighbor_t  neighbor,
Cost_t  costs,
double  gamma,
int  max_iter 
)
inline

Logarithmic Simulated Annealing in a general form.

Parameters
objectSome state in the configuration space.
neighborNeighborhood relation applicable to object
costsCost operator applicable to object
gamma$\Gamma$ in LSA
max_iterMaximal number of iterations

Object_t, Neighbor_t and Cost_t can be arbitrary as long as their objects can allow to execute neighbor (object) with change of object and to execute cost (object) where object can be const and an int-compatible value is returned.

Note
At the moment there are only applications with face_elimination_history_t as Object_t.

Definition at line 106 of file sa.hpp.

References SA().

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

Here is the call graph for this function:

bool angel::maintaining_edge_eliminations ( const vector< EdgeElim > &  bev1,
const c_graph_t &  angelLCG,
const AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
vector< EdgeElim > &  bev2 
)

Definition at line 1227 of file heuristics.cpp.

References edge_elim_effect().

Here is the call graph for this function:

bool angel::maintaining_edge_eliminations ( const vector< EdgeElim > &  bev1,
const c_graph_t &  angelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
vector< EdgeElim > &  bev2 
)

Filter that selects edge elimination targets that don't increase the nontrivial edge count.

Parameters
bev1set of edges that can be eliminated
angelLCGc-graph
ourAwarenessLevelneeded to assess costs of eliminations
bev2set of edge elims that don't increase the nontrivial edge count
Returns
size of bev2

Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), and maintaining_transformations().

bool angel::maintaining_transformations ( const vector< Transformation > &  tv,
const c_graph_t &  angelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
vector< Transformation > &  maintainingTransformationsV 
)

Filter that populates /p maintainingTransformationsV with those edge eliminations and reroutings that maintain the nontrivial edge count (in particular, this includes all reroutings).

Referenced by xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence().

bool angel::maintaining_transformations ( const vector< Transformation > &  tv,
const c_graph_t &  angelLCG,
const AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
vector< Transformation > &  maintainingTransformationsV 
)

Definition at line 1773 of file heuristics.cpp.

References maintaining_edge_eliminations().

Here is the call graph for this function:

int angel::markowitz_degree ( int  j,
const line_graph_t &  lg 
)

Markowitz.

Parameters
jVertex number in c-graph
lgLine graph
Returns
j's Markowitz degree, i.e. number of faces like (*, j, *)

Definition at line 385 of file angel_types.cpp.

References dependent, independent, THROW_DEBUG_EXCEPT_MACRO, and vertex_type().

Here is the call graph for this function:

int angel::markowitz_enlargement_all_neighbors ( c_graph_t::vertex_t  v,
const c_graph_t &  cg 
)

Definition at line 278 of file heuristics.cpp.

References markowitz_enlargement_back(), and markowitz_enlargement_front().

Referenced by angel::lmmdv_op_t::operator()(), and angel::momrv_op_t::operator()().

Here is the call graph for this function:

int angel::markowitz_enlargement_back ( c_graph_t::edge_t  e,
const c_graph_t &  cg,
bool  eliminate_parallel_edges = false 
)

Definition at line 240 of file heuristics.cpp.

References new_in_edges().

Referenced by lmmd_edge_back(), markowitz_enlargement_all_neighbors(), momr_edge_back(), and angel::markowitz_enlargement_back_t::operator()().

Here is the call graph for this function:

int angel::markowitz_enlargement_back ( c_graph_t::edge_t  e,
c_graph_t::edge_t  e2,
const c_graph_t &  cg 
)

Definition at line 255 of file heuristics.cpp.

References THROW_DEBUG_EXCEPT_MACRO.

int angel::markowitz_enlargement_front ( c_graph_t::edge_t  e,
const c_graph_t &  cg,
bool  eliminate_parallel_edges = false 
)

Definition at line 199 of file heuristics.cpp.

References intermediate, new_out_edges(), and vertex_type().

Referenced by lmmd_edge_front(), markowitz_enlargement_all_neighbors(), momr_edge_front(), and angel::markowitz_enlargement_front_t::operator()().

Here is the call graph for this function:

int angel::markowitz_enlargement_front ( c_graph_t::edge_t  e,
c_graph_t::edge_t  e2,
const c_graph_t &  cg 
)

Definition at line 214 of file heuristics.cpp.

References count_parallel_edges(), and THROW_DEBUG_EXCEPT_MACRO.

Here is the call graph for this function:

void angel::markowitz_on_line_graph ( const line_graph_t &  lg,
vector< int > &  mdegree 
)
template<typename Neighbor_t >
int angel::maximal_paths ( c_graph_t::vertex_t  v,
const Neighbor_t &  nin,
std::vector< std::vector< c_graph_t::vertex_t > > &  paths 
)

Referenced by minimal_in_out_degree().

template<typename Neighbor_t >
int angel::minimal_in_out_degree ( c_graph_t::vertex_t  v,
const Neighbor_t &  nin 
)
inline

Definition at line 703 of file angel_tools.hpp.

References maximal_paths().

Referenced by minimal_markowitz_degree().

Here is the call graph for this function:

void angel::minimal_markowitz_degree ( const c_graph_t &  cg,
std::vector< int > &  v 
)
inline

Minimal Markowitz degree for each vertex.

Definition at line 709 of file angel_tools.hpp.

References intermediate, minimal_in_out_degree(), angel::c_graph_t::v(), and vertex_type().

Referenced by overall_minimal_markowitz_degree().

Here is the call graph for this function:

int angel::momr_edge_back ( const vector< c_graph_t::edge_t > &  ev1,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)
inline

Maximal overall Markowitz reduction in back edge elimination.

Parameters
ev1Set of edges that can be eliminated
cgc-graph
ev2Result vector of edges with maximal overall Markowitz reduction
Returns
Size of ev2

Edges in ev1 that cannot be back eliminated are ignored.

Definition at line 720 of file heuristics.hpp.

References momr_edge_f().

Referenced by angel::momre_op_t::operator()().

Here is the call graph for this function:

int angel::momr_edge_back ( c_graph_t::edge_t  e,
const c_graph_t &  cg 
)
inline

Definition at line 737 of file heuristics.cpp.

References back_edge_elimination(), markowitz_enlargement_back(), sum_over_all_in_edges(), and THROW_DEBUG_EXCEPT_MACRO.

Here is the call graph for this function:

int angel::momr_edge_f ( const vector< c_graph_t::edge_t > &  ev1,
bool  front,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)

Maximal overall Markowitz reduction in edge elimination.

Parameters
ev1Set of edges that can be eliminated
frontUsed for front elimination if true, otherwise for back elimination
cgc-graph
ev2Result vector of edges with maximal overall Markowitz reduction
Returns
Size of ev2

This function is intended for elimination sequences that are either completely front or completely back eliminations. For mixed sequences use int momr_edge (const vector<edge_bool_t>& ev1, const c_graph_t& cg, vector<edge_bool_t>& ev2). Note that Markowitz degree reduction due to edge elimination can be different for front and back elimination.

Definition at line 790 of file heuristics.cpp.

Referenced by momr_edge_back(), and momr_edge_front().

int angel::momr_edge_front ( const vector< c_graph_t::edge_t > &  ev1,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)
inline

Maximal overall Markowitz reduction in front edge elimination.

Parameters
ev1Set of edges that can be eliminated
cgc-graph
ev2Result vector of edges with maximal overall Markowitz reduction
Returns
Size of ev2

Edges in ev1 that cannot be front eliminated are ignored.

Definition at line 706 of file heuristics.hpp.

References momr_edge_f().

Referenced by angel::momre_op_t::operator()().

Here is the call graph for this function:

int angel::momr_edge_front ( c_graph_t::edge_t  e,
const c_graph_t &  cg 
)
inline

Definition at line 710 of file heuristics.cpp.

References front_edge_elimination(), markowitz_enlargement_front(), overall_markowitz_degree(), sum_over_all_out_edges(), and THROW_DEBUG_EXCEPT_MACRO.

Here is the call graph for this function:

int angel::moplr_edge ( const vector< c_graph_t::edge_t > &  ev1,
bool  front,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)

Maximal overall path length reduction in mixed edge elimination.

Parameters
ev1Set of edges that can be eliminated and how
frontindicates if the edge is to be front eliminated
cgc-graph
ev2Result vector of edges with maximal path length reduction
Returns
Size of ev2

Definition at line 849 of file heuristics.cpp.

References in_out_path_lengths(), oplr_edge_back(), and oplr_edge_front().

Here is the call graph for this function:

unsigned int angel::multiply_edge_pair_directly ( const c_graph_t::edge_t  e1,
const c_graph_t::edge_t  e2,
c_graph_t &  angelLCG,
list< EdgeRef_t > &  edge_ref_list,
xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionList &  jae_list 
)

Multiply a contiguous pair of edges in an angel c_graph_t and create a new xaifBoosterCrossCountryInterface::JacobianAccumulationExpression.

Parameters
e1the first edge.
e2the second edge (its source is the target of e1).
angelLCGthe c_graph_t (passed by reference) that the operation is performed on.
edge_ref_listthe stl list container that keeps track of the reference (LCG pointer or JAE pointer) for each edge in angelLCG.
jae_listthe xaifBooster JAE list that we construct incrementally as we perform eliminations.
Returns
The cost (in terms of multiplications) of the elimination.

If there's fill-in, a new edge is created and a new edge reference points it to the new JAE. If there's absorption, the existing edge has its reference updated to point to the new JAE.

Definition at line 615 of file eliminations.cpp.

References CONSTANT_EDGE, edge(), angel::c_graph_t::next_edge_number, removeRef(), setJaevRef(), UNIT_EDGE, and VARIABLE_EDGE.

Referenced by back_eliminate_edge_directly(), and front_eliminate_edge_directly().

Here is the call graph for this function:

void angel::neighbor_swap ( const std::vector< int > &  old_seq,
std::vector< int > &  seq 
)

Swap two vertices in sequence (historical, only vertex elimination)

Definition at line 24 of file sa.cpp.

References THROW_DEBUG_EXCEPT_MACRO.

int angel::new_in_edges ( c_graph_t::edge_t  e,
const c_graph_t &  cg 
)

Definition at line 117 of file heuristics.cpp.

Referenced by fill_in_back(), and markowitz_enlargement_back().

int angel::new_out_edges ( c_graph_t::edge_t  e,
const c_graph_t &  cg 
)
size_t angel::noncyclicReroutings ( const vector< Rerouting > &  erv,
const std::vector< Transformation > &  transformationsPerformedV,
const c_graph_t &  angelLCG,
vector< Rerouting > &  noncyclicReroutingsV 
)

Filter that populates noncyclicReroutingsV with (strictly) those reroutings that have not already been performed, based on transformationsPerformedV

Definition at line 1425 of file heuristics.cpp.

Referenced by all_viable_transformations().

void angel::number_dependent_vertices ( const c_graph_t &  cg,
std::vector< int > &  v 
)

Returns for each vertex how many dependent vertices depent on it.

Definition at line 145 of file angel_tools.cpp.

References angel::c_graph_t::dependents.

Referenced by angel::lrm_op_t::lrm_op_t().

void angel::number_independent_vertices ( const c_graph_t &  cg,
std::vector< int > &  v 
)

Returns for each vertex on how many independent vertices it depends.

Definition at line 171 of file angel_tools.cpp.

References angel::c_graph_t::x().

Referenced by angel::lrm_op_t::lrm_op_t().

Here is the call graph for this function:

string angel::numbered_filename ( const string &  basename,
const string &  suffix,
int  number,
int  width = 4 
)

Definition at line 119 of file angel_io.cpp.

unsigned int angel::numIntermediateVertices ( const c_graph_t angelLCG)
unsigned int angel::numIntermediateVerticesWithoutUnitEdge ( const c_graph_t angelLCG)
void angel::open_log_file ( int &  argc,
char **&  argv 
)
inline

Definition at line 465 of file angel_io.hpp.

References log_file.

bool angel::operator!= ( const c_graph_t &  g1,
const c_graph_t &  g2 
)
inline

Compares two c-graphs.

Definition at line 230 of file angel_types.hpp.

bool angel::operator!= ( const line_graph_t &  g1,
const line_graph_t &  g2 
)
inline

Compares two line graphs.

Definition at line 438 of file angel_types.hpp.

template<typename T1 , typename T2 >
ostream& angel::operator<< ( ostream &  stream,
const std::pair< T1, T2 > &  p 
)

Write pair of arbitrary types to stream if their output operator is defined.

Definition at line 80 of file angel_io.hpp.

std::ostream& angel::operator<< ( std::ostream &  stream,
const triplet_t &  t 
)
inline

Output operator of triplet_t.

Definition at line 464 of file angel_types.hpp.

References angel::triplet_t::i, angel::triplet_t::j, and angel::triplet_t::k.

template<class Value_t >
no_output_t& angel::operator<< ( no_output_t &  out,
const Value_t &   
)

Definition at line 492 of file angel_io.hpp.

template<class Value_t >
string_stream_output_t& angel::operator<< ( string_stream_output_t &  out,
const Value_t &  value 
)

Definition at line 510 of file angel_io.hpp.

References angel::string_stream_output_t::mystream.

std::ostream& angel::operator<< ( std::ostream &  stream,
const edge_pair_elim_t &  ee 
)
inline
std::ostream& angel::operator<< ( std::ostream &  stream,
const edge_ij_elim_t &  ee 
)
inline

Output operator of edge_ij_elim_t.

Definition at line 602 of file angel_types.hpp.

References angel::edge_ij_elim_t::front, angel::edge_ij_elim_t::i, and angel::edge_ij_elim_t::j.

bool angel::operator== ( const c_graph_t &  g1,
const c_graph_t &  g2 
)

Compares two c-graphs.

Definition at line 120 of file angel_types.cpp.

References angel::c_graph_t::dependents, angel::c_graph_t::v(), angel::c_graph_t::x(), angel::c_graph_t::y(), and angel::c_graph_t::z().

Here is the call graph for this function:

bool angel::operator== ( const line_graph_t &  g1,
const line_graph_t &  g2 
)

Compares two line graphs.

Definition at line 328 of file angel_types.cpp.

References angel::line_graph_t::dependents, angel::line_graph_t::v(), angel::line_graph_t::x(), angel::line_graph_t::y(), and angel::line_graph_t::z().

Here is the call graph for this function:

int angel::oplr_edge_back ( c_graph_t::edge_t  e,
const vector< int > &  vni,
const vector< int > &  vli,
const vector< int > &  vno,
const vector< int > &  vlo,
const c_graph_t &  cg 
)

Definition at line 412 of file heuristics.cpp.

References oplr_face().

Referenced by moplr_edge().

Here is the call graph for this function:

int angel::oplr_edge_front ( c_graph_t::edge_t  e,
const vector< int > &  vni,
const vector< int > &  vli,
const vector< int > &  vno,
const vector< int > &  vlo,
const c_graph_t &  cg 
)

Definition at line 397 of file heuristics.cpp.

References oplr_face().

Referenced by moplr_edge(), and angel::oplrv_op_t::operator()().

Here is the call graph for this function:

int angel::oplr_face ( c_graph_t::edge_t  e1,
c_graph_t::edge_t  e2,
const vector< int > &  vni,
const vector< int > &  vli,
const vector< int > &  vno,
const vector< int > &  vlo,
const c_graph_t &  cg 
)
inline

Definition at line 378 of file heuristics.cpp.

References edge(), and THROW_DEBUG_EXCEPT_MACRO.

Referenced by oplr_edge_back(), and oplr_edge_front().

Here is the call graph for this function:

int angel::overall_markowitz_degree ( const c_graph_t &  cg)

Markowitz degree of all vertices in cg.

Definition at line 162 of file angel_types.cpp.

Referenced by angel::line_graph_t::line_graph_t(), momr_edge_front(), angel::momrv_op_t::operator()(), and angel::momrf_op_t::operator()().

int angel::overall_markowitz_degree ( const line_graph_t &  lg)

Markowitz degree of all vertices.

Definition at line 374 of file angel_types.cpp.

References dependent, independent, and vertex_type().

Here is the call graph for this function:

int angel::overall_minimal_markowitz_degree ( const c_graph_t &  cg)
inline

Sum of minimal Markowitz degrees.

Definition at line 720 of file angel_tools.hpp.

References minimal_markowitz_degree().

Here is the call graph for this function:

unsigned int angel::pair_elim ( c_graph_t::edge_t  e1,
c_graph_t::edge_t  e2,
c_graph_t &  angelLCG,
const elimSeq_cost_t &  currentElimSeq,
refillDependenceMap_t &  refillDependences 
)
unsigned int angel::pairElim_noJAE ( c_graph_t::edge_t  e1,
c_graph_t::edge_t  e2,
c_graph_t &  angelLCG,
const transformationSeq_cost_t *  currentTransformationSequence,
refillDependenceMap_t &  refillDependences 
)
void angel::permutate_vertices ( const c_graph_t &  gin,
const vector< c_graph_t::vertex_t > &  p,
c_graph_t &  gout 
)

Definition at line 208 of file angel_tools.cpp.

References angel::c_graph_t::dependents, edge(), renumber_edges(), angel::c_graph_t::swap(), angel::c_graph_t::v(), and angel::c_graph_t::x().

Here is the call graph for this function:

void angel::permutate_vertices ( const c_graph_t &  gin,
const std::vector< c_graph_t::vertex_t > &  p,
c_graph_t &  gout 
)

Permutates vertices, vertex v in gin becomes p[v] in gout.

Referenced by independent_vertices_to_front().

void angel::populate_remainderGraph_and_correlationLists ( const c_graph_t angelLCG,
const vector< const LinearizedComputationalGraphVertex * >  ourLCG_verts,
const list< EdgeRef_t > &  edge_ref_list,
LinearizedComputationalGraph &  remainderLCG,
VertexCorrelationList &  v_cor_list,
EdgeCorrelationList &  e_cor_list 
)
void angel::postProcessRemainderGraph ( c_graph_t theAngelLCG,
xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionList &  theJAEList,
std::list< EdgeRef_t > &  edge_ref_list,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel 
)

This function greedily performs edge eliminations that have no computational cost and decrease the total number of edges without increasing the number of nontrivial edges. This is intended as a post-processing step to scarcity heuristics.

Todo:
Currently, it does not perform eliminations that decrease the nontrivial edge count. The idea is that this should be handled by the heuristic itself.

Definition at line 604 of file xaif_interface.cpp.

References assessEdgeElim(), back_eliminate_edge_directly(), eliminatable_edges(), front_eliminate_edge_directly(), and THROW_EXCEPT_MACRO.

Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), and xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random().

Here is the call graph for this function:

unsigned int angel::postroute_edge_directly ( edge_reroute_t  er,
c_graph_t &  angelLCG,
list< EdgeRef_t > &  edge_ref_list,
xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionList &  jae_list 
)
unsigned int angel::postroute_edge_directly ( edge_reroute_t  er,
c_graph_t &  angelLCG,
list< EdgeRef_t > &  edge_ref_list,
JacobianAccumulationExpressionList &  jae_list 
)
template<typename Ad_graph_t >
void angel::predecessor_set ( typename Ad_graph_t::vertex_descriptor  v,
const Ad_graph_t &  adg,
typename std::vector< typename Ad_graph_t::vertex_descriptor > &  vec 
)
inline

Returns successor set of v as vector vec.

Definition at line 195 of file angel_tools.hpp.

Referenced by angel::diste_op_t::operator()(), and sorted_predecessor_set().

unsigned int angel::preroute_edge_directly ( edge_reroute_t  er,
c_graph_t &  angelLCG,
list< EdgeRef_t > &  edge_ref_list,
xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionList &  jae_list 
)
unsigned int angel::preroute_edge_directly ( edge_reroute_t  er,
c_graph_t &  angelLCG,
list< EdgeRef_t > &  edge_ref_list,
JacobianAccumulationExpressionList &  jae_list 
)
void angel::put_unit_edge_weight ( c_graph_t &  cg)
inline

Sets all edge labels (in ew) to 1.

Definition at line 748 of file angel_tools.hpp.

void angel::put_unit_vertex_weight ( line_graph_t &  lg)
inline

Sets all vertex labels (in ed) to 1.

Definition at line 741 of file angel_tools.hpp.

double angel::random ( double  n)
inline

Random value from [0, n)

Definition at line 525 of file angel_tools.hpp.

int angel::random ( int  n)
inline

Random value between 0 and n-1, i.e. from [0, n)

Definition at line 529 of file angel_tools.hpp.

int angel::random ( const std::vector< double > &  p)
inline

Random number characterized by p, the accumulated probabities.

  • p[0] is the probability of returning 0
  • p[1] the probability of returning 0 or 1
  • p.size()-1 is the maximal return value
  • p[p.size()-1] must be 1.0

Definition at line 544 of file angel_tools.hpp.

References random(), and THROW_EXCEPT_MACRO.

Here is the call graph for this function:

void angel::random_block ( int  inputs,
int  outputs,
int  stats,
int  max_exp,
double  unary,
c_graph_t &  block 
)

Generates a random basic block.

Parameters
inputsThe number of the block's inputs
outputsThe number of the block's outputs
statsThe number of statements
max_expThe maximal number of expressions in each statement
unaryThe portion of unary expressions, the remainder are binary.
blockThe resulting block

Definition at line 245 of file graph_generator.cpp.

References random_statement_vector(), and stats2block().

Here is the call graph for this function:

int angel::random_high ( int  n,
int  exp = 2 
)
inline

Random value from [0, n) where larger values have higher probability (increases with exp)

Definition at line 533 of file angel_tools.hpp.

Referenced by angel::neighbor_sequence_check_t::operator()(), and angel::neighbor_check_meta_t::operator()().

void angel::random_statement ( int  inputs,
int  expr,
const vector< double > &  p,
c_graph_t &  statement 
)

Definition at line 32 of file graph_generator.cpp.

References random(), angel::c_graph_t::swap(), and THROW_DEBUG_EXCEPT_MACRO.

Here is the call graph for this function:

void angel::random_statement ( int  inputs,
int  expr,
const std::vector< double > &  p,
c_graph_t &  statement 
)

Generates a random statement.

Parameters
inputsThe number of inputs
exprThe number of expressions
pProbability vector (see description)
statementThe resulting statement

The number of an expression's input is characterized by p

  • p[0] is the probability that an expression is unary
  • p[1] the probability that it is binary at most
  • p.size() is the maximal arity
  • p[p.size()-1] shall be 1.0

Referenced by random_statement_vector().

void angel::random_statement_vector ( int  max_expr,
double  unary,
std::vector< c_graph_t > &  statement_vector 
)

Generates a vector of random statements.

Parameters
max_exprThe maximal number of expressions in each statement
unaryThe portion of unary expressions, the remainder are binary.
statement_vectorThe resulting statement list

The number of statement is determined by the vector size. In contrast to random_statement() it is restricted to unary and binary expressions.

Definition at line 94 of file graph_generator.cpp.

References random(), random_statement(), THROW_DEBUG_EXCEPT_MACRO, and write_graph().

Referenced by random_block().

Here is the call graph for this function:

bool angel::reachable ( const c_graph_t::vertex_t  src,
const c_graph_t::vertex_t  tgt,
c_graph_t &  angelLCG 
)

Answers a reachability query from src to tgt.

Definition at line 23 of file angel_tools.cpp.

Referenced by refill_avoiding_edge_eliminations(), and reroutable_edges().

template<typename Ad_graph_t >
void angel::reachable_vertices ( const Ad_graph_t &  adg,
std::vector< bool > &  rv 
)

Computes all reachable vertices for c- and line graphs.

I.e. there are pathes from independent nodes to these nodes. Uses breadth first search over all independent vertices.

Definition at line 634 of file angel_tools.hpp.

Referenced by angel::c_graph_t::clear_graph(), and angel::line_graph_t::clear_graph().

int angel::read_graph_eliad ( const string &  file_name,
c_graph_t &  cg,
bool  retry = true 
)

Read graph in EliAD graph format from file.

In case file not found a new name is asked for (on cin) if retry == true or ommited. If no name is entered then an exception containing the last tried filename is thrown. Otherwise it is retried with the new name which is returned in the parameter list.

Definition at line 26 of file angel_io.cpp.

References angel::c_graph_t::check_initial(), angel::c_graph_t::dependents, edge(), independent_vertices_to_front(), angel::c_graph_t::swap(), THROW_EXCEPT_MACRO, and angel::c_graph_t::X.

Here is the call graph for this function:

void angel::read_graph_xaif_booster ( const LinearizedComputationalGraph &  xg,
c_graph_t cg,
vector< const LinearizedComputationalGraphVertex * > &  av,
vector< edge_address_t > &  ae 
)
bool angel::reducing_edge_eliminations ( const vector< EdgeElim > &  bev1,
const c_graph_t &  angelLCG,
const AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
vector< EdgeElim > &  bev2 
)

Definition at line 1249 of file heuristics.cpp.

References edge_elim_effect().

Here is the call graph for this function:

bool angel::reducing_edge_eliminations ( const vector< EdgeElim > &  bev1,
const c_graph_t &  angelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
vector< EdgeElim > &  bev2 
)

Filter that selects edge elimination targets that decrease the nontrivial edge count.

Parameters
bev1set of edges that can be eliminated
angelLCGc-graph
ourAwarenessLevelneeded to assess costs of eliminations
bev2set of edge elims that decrease the nontrivial edge count
Returns
size of bev2

Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), and reducing_transformations().

bool angel::reducing_reroutings ( const vector< Rerouting > &  erv,
const c_graph_t &  angelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
vector< Rerouting > &  reducingReroutingsV 
)

Filter that populates /p reducingReroutingsV with those reroutings that can be followed by an edge elimination with an overall reduction in the nontrivial edgecount.

Referenced by reducing_transformations().

bool angel::reducing_reroutings ( const vector< Rerouting > &  erv,
const c_graph_t &  angelLCG,
const AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
vector< Rerouting > &  reducingReroutingsV 
)
bool angel::reducing_transformations ( const vector< Transformation > &  tv,
const c_graph_t &  angelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
vector< Transformation > &  reducingTransformationsV 
)

Filter that populates /p reducingTransformationsV with edge eliminations that reduce the nontrivial edge count and reroutings that can be followed by an edge elimination with an overall reduction in the nontrivial edgecount.

Referenced by xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence().

bool angel::reducing_transformations ( const vector< Transformation > &  tv,
const c_graph_t &  angelLCG,
const AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
vector< Transformation > &  reducingTransformationsV 
)

Definition at line 1811 of file heuristics.cpp.

References eliminatable_edges(), reducing_edge_eliminations(), and reducing_reroutings().

Here is the call graph for this function:

bool angel::refill_avoiding_edge_eliminations ( const vector< EdgeElim > &  bev1,
c_graph_t &  angelLCG,
const refillDependenceMap_t  refillDependences,
vector< EdgeElim > &  bev2 
)

Filter that selects edge elimination targets whose refill dependences (a possibly empty set of vertices) have been met (meaning that there is no alternate path for the edge through the vertex).

Parameters
bev1set of edges that can be eliminated
angelLCGc-graph
refillDependencespartial map of edges to a set of vertices that lie on paths from the edge sources to the edge targets, used to anticipate refill.
bev2set of edge elims that dont violate refill dependences (returned by reference)
Returns
size of bev2

Definition at line 1272 of file heuristics.cpp.

References reachable().

Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), and refill_avoiding_transformations().

Here is the call graph for this function:

bool angel::refill_avoiding_transformations ( const vector< Transformation > &  tv,
c_graph_t &  angelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
const refillDependenceMap_t &  refillDependences,
vector< Transformation > &  refillAvoidingTransformationsV 
)

Filter that populates /p refillAvoidingTransformationsV with edge eliminations that aren't known to be refillable in the future. Any reroutings are passed straight through.

Referenced by xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence().

bool angel::refill_avoiding_transformations ( const vector< Transformation > &  tv,
c_graph_t &  angelLCG,
const AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
const refillDependenceMap_t &  refillDependences,
vector< Transformation > &  refillAvoidingTransformationsV 
)

Definition at line 1864 of file heuristics.cpp.

References refill_avoiding_edge_eliminations().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::relevant_vertices ( const Ad_graph_t &  adg,
std::vector< bool > &  rv 
)

Computes all relevant vertices for c- and line graphs.

I.e. there are pathes from these nodes to dependent nodes. Uses backward breadth first search over all dependent vertices.

Definition at line 666 of file angel_tools.hpp.

Referenced by angel::c_graph_t::clear_graph(), and angel::line_graph_t::clear_graph().

template<typename Ad_graph_t >
int angel::remove_edges ( typename Ad_graph_t::vertex_descriptor  i,
Ad_graph_t &  adg 
)
inline

Removes irrelevant and unreachable edges from adg starting with i.

Definition at line 859 of file angel_tools.hpp.

References remove_irrelevant_edges(), and remove_unreachable_edges().

Here is the call graph for this function:

int angel::remove_hoisting_vertices ( c_graph_t &  cg)

Removes all vertices with one predecessor and one successor from cg.

Definition at line 287 of file angel_tools.cpp.

References intermediate, vertex_elimination(), and angel::c_graph_t::vertex_type().

Here is the call graph for this function:

template<typename Ad_graph_t >
int angel::remove_irrelevant_edges ( typename Ad_graph_t::vertex_descriptor  i,
Ad_graph_t &  adg,
bool  fast = false 
)

Removes irrelevant edges from adg starting with i.

It removes all in-edges of vertix i if i has no out-edges and continues, in this case, recursively with the predecessors of i.

Definition at line 789 of file angel_tools.hpp.

Referenced by face_elimination(), and remove_edges().

void angel::remove_parallel_edges ( c_graph_t &  cg)

Removes parallel edges.

  • edges are inserted in the order of their first occurrence e.g. (2, 3), (2, 5), (2, 3), (2, 4), (2, 5) -> (2, 3), (2, 5), (2, 4)
  • edge weights are summed for parallel edges

Definition at line 299 of file angel_tools.cpp.

References angel::c_graph_t::dependents, edge(), angel::c_graph_t::swap(), angel::c_graph_t::v(), and angel::c_graph_t::x().

Here is the call graph for this function:

void angel::remove_trivial_edges ( c_graph_t &  cg)

Eliminates all edges with label 1, front elimination is preferred.

Definition at line 327 of file angel_tools.cpp.

References back_edge_elimination(), front_edge_elimination(), independent, and angel::c_graph_t::vertex_type().

Here is the call graph for this function:

template<typename Ad_graph_t >
int angel::remove_unreachable_edges ( typename Ad_graph_t::vertex_descriptor  i,
Ad_graph_t &  adg,
bool  fast = false 
)

Removes unreachable edges from adg starting with i.

It removes all out-edges of vertix i if i has no in-edges and continues, in this case, recursively with the successors of i.

Definition at line 826 of file angel_tools.hpp.

Referenced by face_elimination(), and remove_edges().

void angel::removeRef ( const c_graph_t::edge_t  e,
const c_graph_t &  angelLCG,
list< EdgeRef_t > &  edge_ref_list 
)
int angel::renumber_edges ( c_graph_t &  cg)

Renumber edges of cg continously, i.e. to [0..num_edges-1].

Definition at line 256 of file angel_tools.cpp.

Referenced by block2loop(), angel::line_graph_t::line_graph_t(), and permutate_vertices().

unsigned int angel::replay_transformation_seq ( c_graph_t angelLCG,
const vector< Transformation transformationSeqV,
unsigned int &  previous_numNontrivialEdges,
const AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
transformationSeq_cost_t dummy_transformationSeq_cost,
refillDependenceMap_t dummy_refillDependenceMap 
)
void angel::reroutable_edges ( c_graph_t &  angelLCG,
vector< edge_reroute_t > &  erv 
)

Populates a list of all viable edge reroutings in angelLCG.

Parameters
angelLCGthe c_graph_t (passed by reference) that the operation is performed on.
ervempty list that will hold all pre-routings and post-routings in angelLCG.
Returns
List of edge reroutings erv (by reference).

Definition at line 20 of file reroutings.cpp.

References edge(), and reachable().

Referenced by all_viable_transformations(), and reroutable_edges().

Here is the call graph for this function:

unsigned int angel::reroutable_edges ( c_graph_t &  angelLCG,
vector< Rerouting > &  allReroutingsV 
)

Definition at line 96 of file reroutings.cpp.

References reroutable_edges().

Here is the call graph for this function:

int angel::reroute_effect ( const edge_reroute_t  er,
const c_graph_t &  angelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
bool &  incrementIsTrivial 
)

Calculates the change in nontrivial edge count from er without actually performing it. In addition, incrementIsTrivial is returned by reference

Referenced by reducing_reroutings(), and transformation_effect().

int angel::reroute_effect ( const edge_reroute_t  er,
const c_graph_t &  angelLCG,
const AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel,
bool &  incrementIsTrivial 
)

Definition at line 109 of file reroutings.cpp.

References angel::edge_reroute_t::e, edge(), angel::edge_reroute_t::isPre, angel::edge_reroute_t::pivot_e, THROW_EXCEPT_MACRO, UNIT_EDGE, and VARIABLE_EDGE.

Here is the call graph for this function:

bool angel::rerouting_considerate_edge_eliminations ( const vector< EdgeElim > &  bev,
const c_graph_t &  angelLCG,
const std::vector< Transformation > &  transformationsPerformedV,
vector< EdgeElim > &  reroutingConsiderateEdgeElimsV 
)

Filter for selecting those edge eliminations that don't undo a rerouting (a front-elimination can undo a pre-routing, and a back-elimination can undo a post-routing)

Definition at line 1333 of file heuristics.cpp.

Referenced by rerouting_considerate_transformations().

bool angel::rerouting_considerate_transformations ( const vector< Transformation > &  tv,
const c_graph_t &  angelLCG,
const std::vector< Transformation > &  transformationsPerformedV,
vector< Transformation > &  reroutingConsiderateTransformationsV 
)

Filter that populates /p reroutingConsiderateTransformationsV with edge eliminations that don't undo reroutings. Any reroutings are passed straight through.

Definition at line 1898 of file heuristics.cpp.

References rerouting_considerate_edge_eliminations().

Referenced by xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence().

Here is the call graph for this function:

int angel::reverse_mode_edge_back ( const vector< c_graph_t::edge_t > &  ev1,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)
inline

Reverse mode in back edge elimination.

Parameters
ev1Set of edges that can be eliminated
cgc-graph
ev2Result vector of edges, contains lowest edge in lexicographical order
Returns
Size of ev2, always 1 (if ev1 is not empty)

Edges in ev1 that cannot be back eliminated are ignored.

Definition at line 403 of file heuristics.hpp.

References reverse_mode_edge_f().

Here is the call graph for this function:

int angel::reverse_mode_edge_f ( const vector< c_graph_t::edge_t > &  ev1,
bool  front,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)

Reverse mode in edge elimination.

Parameters
ev1Set of edges that can be eliminated
frontUsed for front elimination if true, otherwise for back elimination
cgc-graph
ev2Result vector of edges, contains highest edge in lexicographical order
Returns
Size of ev2, always 1 (if ev1 is not empty)

This function is intended for elimination sequences that are either completely front or completely back eliminations. For mixed sequences use int reverse_mode_edge (const vector<pair<c_graph_t::edge_t,bool> >& ev1, const c_graph_t& cg, vector<pair<c_graph_t::edge_t,bool> >& ev2).

Definition at line 509 of file heuristics.cpp.

References inv_lex_greater(), and lex_greater().

Referenced by reverse_mode_edge_back(), and reverse_mode_edge_front().

Here is the call graph for this function:

int angel::reverse_mode_edge_front ( const vector< c_graph_t::edge_t > &  ev1,
const c_graph_t &  cg,
vector< c_graph_t::edge_t > &  ev2 
)
inline

Reverse mode in front edge elimination.

Parameters
ev1Set of edges that can be eliminated
cgc-graph
ev2Result vector of edges, contains lowest edge in lexicographical order
Returns
Size of ev2, always 1 (if ev1 is not empty)

Edges in ev1 that cannot be front eliminated are ignored.

Definition at line 389 of file heuristics.hpp.

References reverse_mode_edge_f().

Here is the call graph for this function:

bool angel::reverse_mode_transformations ( const vector< Transformation > &  tv,
const c_graph_t &  angelLCG,
vector< Transformation > &  reverseModeTransformationsV 
)

Filter that populates /p lowestMarkowitzTransformationsV with an edge elimination that is chosen by reverse topological order. Any reroutings are passed straight through.

Definition at line 1954 of file heuristics.cpp.

References reverseModeEdgeElim().

Referenced by xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence().

Here is the call graph for this function:

bool angel::reverseModeEdgeElim ( const vector< EdgeElim > &  inEEV,
const c_graph_t &  angelLCG,
vector< EdgeElim > &  outEEV 
)
double angel::rme_obj ( edge_bool_t  eb,
const c_graph_t &  cg 
)
inline

Definition at line 527 of file heuristics.cpp.

References edge(), and angel::c_graph_t::x().

Referenced by angel::reverse_mode_edge_t::operator()().

Here is the call graph for this function:

template<class Object_t , class Neighbor_t , class Cost_t , class Temp_t >
int angel::SA ( Object_t &  object,
Neighbor_t  neighbor,
Cost_t  costs,
Temp_t  temp,
int  max_iter 
)

Simulated Annealing in a general form.

Parameters
objectSome state in the configuration space.
neighborNeighborhood relation applicable to object
costsCost operator applicable to object
tempTemperature operator depending on iteration number, e.g. LOG_temperature_t
max_iterMaximal number of iterations

Object_t, Neighbor_t and Cost_t can be arbitrary as long as their objects can allow to execute neighbor (object) with change of object and to execute cost (object) where object can be const and an int-compatible value is returned. The temperature operator is expected to take an int parameter and to return a double result.

Note
At the moment there are only applications with instantiations of elimination_history_t as Object_t.

Definition at line 19 of file sa_impl.hpp.

References random(), and SA_acceptance().

Referenced by FTSA(), and LSA().

Here is the call graph for this function:

template<class Temp_t >
double angel::SA_acceptance ( int  diff,
int  it,
Temp_t  temp 
)
inline

Probability to accept new object in SA.

Parameters
diffThe difference between old and new costs, must be < 0.
itCurrent number of iterations
tempFunctor that computes temperature for iteration number it

Definition at line 68 of file sa.hpp.

Referenced by SA().

template<typename Ad_graph_t >
graph_traits<Ad_graph_t>::edge_iterator angel::same_edge ( typename Ad_graph_t::edge_descriptor  e,
const Ad_graph_t &  g1,
const Ad_graph_t &  g2 
)
inline

Returns same edge in another graph.

e is an edge of g1, same_egde returns an edge_iterator to the same edge (equal source and equal target) in g2 (or e_end if not found)

Definition at line 341 of file angel_tools.hpp.

Referenced by angel::momrf_op_t::operator()().

template<typename Ad_graph_t >
void angel::same_neighbors ( typename Ad_graph_t::vertex_descriptor  v,
const Ad_graph_t &  adg,
typename std::vector< typename Ad_graph_t::vertex_descriptor > &  vec 
)
inline

Returns set of vertices (in vec) that have same predecessor and successor set as v.

Definition at line 303 of file angel_tools.hpp.

References same_predecessors(), and same_successors().

Referenced by face_elimination().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::same_predecessors ( typename Ad_graph_t::vertex_descriptor  v,
const Ad_graph_t &  adg,
typename std::vector< typename Ad_graph_t::vertex_descriptor > &  vec 
)
inline

Returns set of vertices (in vec) that have same predecessor set as v.

Definition at line 285 of file angel_tools.hpp.

References sorted_predecessor_set(), and unique_vector().

Referenced by face_elimination(), and same_neighbors().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::same_successors ( typename Ad_graph_t::vertex_descriptor  v,
const Ad_graph_t &  adg,
typename std::vector< typename Ad_graph_t::vertex_descriptor > &  vec 
)
inline

Returns set of vertices (in vec) that have same successor set as v.

Definition at line 253 of file angel_tools.hpp.

References sorted_successor_set(), and unique_vector().

Referenced by face_elimination(), and same_neighbors().

Here is the call graph for this function:

template<typename Neighbor_t >
bool angel::search_path ( const std::vector< c_graph_t::vertex_t > &  from,
const std::vector< c_graph_t::vertex_t > &  to,
const Neighbor_t &  n,
std::vector< c_graph_t::vertex_t > &  path,
bool  breadth_first = false 
)
int angel::semi_eliminatable_vertices ( const c_graph_t &  cg,
vector< c_graph_t::vertex_t > &  vv 
)

Returns a set of vertices that can be eliminated from c-graph cg by edge elimination.

Besides intermediate vertices, dependent vertices with outgoing edges are included.

Definition at line 359 of file eliminations.cpp.

References dependent, intermediate, and angel::c_graph_t::vertex_type().

Here is the call graph for this function:

void angel::setJaevRef ( const c_graph_t::edge_t  e,
xaifBoosterCrossCountryInterface::JacobianAccumulationExpressionVertex &  jaev,
const c_graph_t &  angelLCG,
const list< EdgeRef_t > &  edge_ref_list 
)

Definition at line 585 of file eliminations.cpp.

References getJAE_p(), getLCG_p(), getRefType(), JAE_VERT, LCG_EDGE, and THROW_EXCEPT_MACRO.

Referenced by multiply_edge_pair_directly(), postroute_edge_directly(), and preroute_edge_directly().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::sorted_predecessor_set ( typename Ad_graph_t::vertex_descriptor  v,
const Ad_graph_t &  adg,
typename std::vector< typename Ad_graph_t::vertex_descriptor > &  vec 
)
inline

Returns successor set of v as vector vec, vertices are sorted.

Definition at line 206 of file angel_tools.hpp.

References predecessor_set().

Referenced by face_elimination(), and same_predecessors().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::sorted_successor_set ( typename Ad_graph_t::vertex_descriptor  v,
const Ad_graph_t &  adg,
typename std::vector< typename Ad_graph_t::vertex_descriptor > &  vec 
)
inline

Returns successor set of v as vector vec, vertices are sorted.

Definition at line 186 of file angel_tools.hpp.

References successor_set().

Referenced by face_elimination(), and same_successors().

Here is the call graph for this function:

void angel::stats2block ( int  inputs,
int  outputs,
const std::vector< c_graph_t > &  stats,
c_graph_t &  block 
)

Build a block from a list of statements.

Parameters
inputsThe number of the block's inputs
outputsThe number of the block's outputs
statsList of statements
blockThe resulting block

Definition at line 118 of file graph_generator.cpp.

References angel::c_graph_t::dependents, random(), angel::c_graph_t::swap(), take_over_successors(), THROW_DEBUG_EXCEPT_MACRO, THROW_EXCEPT_MACRO, angel::c_graph_t::v(), and angel::c_graph_t::x().

Referenced by random_block().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::successor_set ( typename Ad_graph_t::vertex_descriptor  v,
const Ad_graph_t &  adg,
typename std::vector< typename Ad_graph_t::vertex_descriptor > &  vec 
)
inline

Returns successor set of v as vector vec.

Definition at line 175 of file angel_tools.hpp.

Referenced by angel::diste_op_t::operator()(), and sorted_successor_set().

template<typename Ad_graph_t , typename Op_t >
int angel::sum_over_all_in_edges ( typename Ad_graph_t::vertex_descriptor  v,
Ad_graph_t &  adg,
const Op_t &  op 
)
inline

Applies op to all in-edges of v and sum it.

Definition at line 153 of file angel_tools.hpp.

Referenced by lmmd_edge_back(), momr_edge_back(), and angel::momrf_op_t::operator()().

template<typename Ad_graph_t , typename Op_t >
int angel::sum_over_all_out_edges ( typename Ad_graph_t::vertex_descriptor  v,
const Ad_graph_t &  adg,
const Op_t &  op 
)
inline

Applies op to all out-edges of v and sum it.

Definition at line 164 of file angel_tools.hpp.

Referenced by lmmd_edge_front(), momr_edge_front(), and angel::momrf_op_t::operator()().

void angel::take_over_successors ( c_graph_t::vertex_t  v1,
c_graph_t::vertex_t  v2,
int  offset,
const c_graph_t &  g1,
int &  edge_number,
c_graph_t &  g2 
)

Definition at line 267 of file angel_tools.cpp.

References THROW_DEBUG_EXCEPT_MACRO, and angel::c_graph_t::v().

Referenced by stats2block().

Here is the call graph for this function:

int angel::transformation_effect ( const Transformation  t,
const c_graph_t &  angelLCG,
const xaifBoosterCrossCountryInterface::AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel 
)

Assesses the change in nontrivial edge count that results from applying the transformation t

Referenced by xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random().

int angel::transformation_effect ( const Transformation  t,
const c_graph_t &  angelLCG,
const AwarenessLevel::AwarenessLevel_E  ourAwarenessLevel 
)
template<typename El_t >
void angel::unique_vector ( std::vector< El_t > &  v)

Sorts arbitrary vector and removes double elements.

Definition at line 230 of file angel_tools.hpp.

Referenced by common_predecessor(), common_successors(), same_predecessors(), and same_successors().

template<class Object_t , class Ad_graph_t , class Heuristic_t >
int angel::use_heuristic ( const Ad_graph_t &  adg,
vector< Object_t > &  el_seq,
Heuristic_t  h 
)
inline

Use heuristic to transform c-/line graph into bi-/tri-partite graph.

Parameters
adgc-graph or line graph
el_seqObtained elimination sequence
hHeuristic or combination of heuristics
Returns
Elimination costs

At first graph adg is copied. The type of elimination is determined by the element type of vector el_seq. Then all objects (vertex, edge, face) chosen by h are eliminated from the graph copy.

See Also
eliminatable_objects
eliminate()
heuristic_pair_t

Definition at line 1163 of file heuristics.hpp.

References eliminatable_objects(), and eliminate().

Referenced by best_heuristic(), and angel::SA_elimination_cost_t< Heuristic_t >::operator()().

Here is the call graph for this function:

template<class Object_t , class Ad_graph_t , class Heuristic_t >
int angel::use_heuristic_debug ( const Ad_graph_t &  adg,
vector< Object_t > &  el_seq,
Heuristic_t  h 
)
inline

Debugging version of use_heuristic, several outputs.

Parameters
adgc-graph or line graph
el_seqObtained elimination sequence
hHeuristic or combination of heuristics
Returns
Elimination costs
See Also
use_heuristic
eliminatable_objects
eliminate()
heuristic_pair_t

Definition at line 1225 of file heuristics.hpp.

References eliminatable_objects(), eliminate(), write_graph(), and write_vector().

Here is the call graph for this function:

template<class Object_t , class Ad_graph_t , class Heuristic_t >
int angel::use_heuristic_noconst ( Ad_graph_t &  adg,
vector< Object_t > &  el_seq,
Heuristic_t  h 
)
inline

Use heuristic to transform c-/line graph into bi-/tri-partite graph.

Parameters
adgc-graph or line graph
el_seqObtained elimination sequence
hHeuristic or combination of heuristics
Returns
Elimination costs

Same as use_heuristic but the graph is changed not copied.

See Also
use_heuristic
eliminatable_objects
eliminate()
heuristic_pair_t

Definition at line 1195 of file heuristics.hpp.

References eliminatable_objects(), and eliminate().

Here is the call graph for this function:

template<class Object_t , class Ad_graph_t , class Heuristic_t , class Output_t >
int angel::use_heuristic_trace ( const Ad_graph_t &  adg,
vector< Object_t > &  el_seq,
Heuristic_t  h,
Output_t  output 
)
inline

Tracing version of use_heuristic, writes costs for every elimination.

Parameters
adgc-graph or line graph
el_seqObtained elimination sequence
hHeuristic or combination of heuristics
output
Returns
Elimination costs
See Also
use_heuristic
eliminatable_objects
eliminate
heuristic_pair_t

Definition at line 1271 of file heuristics.hpp.

References eliminatable_objects(), and eliminate().

Here is the call graph for this function:

void angel::vertex_downset ( const c_graph_t::vertex_t  v,
const c_graph_t &  angelLCG,
vertex_set_t &  downset 
)

Returns a set of vertices in adg that v depends on.

Definition at line 54 of file angel_tools.cpp.

bool angel::vertex_eliminatable ( const c_graph_t &  cg)
inline

Whether cg can be transformed into bipartite graph by vertex eliminations.

Definition at line 237 of file angel_types.hpp.

References angel::c_graph_t::dependents.

Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence().

int angel::vertex_elimination ( c_graph_t::vertex_t  v,
c_graph_t &  cg 
)

Elimination of vertex v from c-graph cg

Returns
The costs (number of operation)

Definition at line 27 of file eliminations.cpp.

References back_edge_elimination().

Referenced by convert_elimination_sequence(), eliminate(), angel::momrv_op_t::operator()(), remove_hoisting_vertices(), and vertex_elimination().

Here is the call graph for this function:

int angel::vertex_elimination ( int  j,
c_graph_t &  cg 
)
inline

Elimination of vertex with number j from c-graph cg

Returns
The costs (number of operation)

Definition at line 44 of file eliminations.hpp.

References vertex_elimination().

Here is the call graph for this function:

int angel::vertex_elimination ( const vector< int > &  seq,
c_graph_t &  cg 
)

Elimination of vertices in sequence seq from c-graph cg

Returns
The costs (number of operation)
int angel::vertex_elimination ( int  j,
line_graph_t &  lg 
)

Eliminate vertex with number j in line graph lg

All faces (*,j,*) are eliminated

Definition at line 167 of file eliminations.cpp.

References face_elimination().

Here is the call graph for this function:

void angel::vertex_upset ( const c_graph_t::vertex_t  v,
const c_graph_t &  angelLCG,
vertex_set_t &  upset 
)

Returns a set of vertices in adg that depend on v.

Definition at line 40 of file angel_tools.cpp.

int angel::was_non_trivial_elimination ( int  i,
int  j,
int  k,
const line_graph_t &  lg 
)
inline

Returns whether face elimination induces an operation during Jacobian accumulation

Parameters
inode number of the source of the face
jnode number of the source of the face
kis the number of a new node or the number of the node absorbing the face
lgthe line graph
Returns
1 if elimination induces operation (+, *, or fused multiply add) otherwise 0

Definition at line 393 of file eliminations.hpp.

References angel::line_graph_t::v().

Referenced by eliminate(), and was_non_trivial_elimination().

Here is the call graph for this function:

int angel::was_non_trivial_elimination ( line_graph_t::face_t  f,
int  k,
const line_graph_t &  lg 
)
inline

Returns whether face elimination induces an operation during Jacobian accumulation

Parameters
fthe face
kis the number of a new node or the number of the node absorbing the face
lgthe line graph
Returns
1 if elimination induces operation (+, *, or fused multiply add) otherwise 0

Definition at line 407 of file eliminations.hpp.

References was_non_trivial_elimination().

Here is the call graph for this function:

size_t angel::which_index ( const LinearizedComputationalGraphVertex *const  add,
const vector< const LinearizedComputationalGraphVertex * > &  av 
)
inline

Definition at line 30 of file xaif_interface.cpp.

Referenced by ourLCG_to_angelLCG(), and read_graph_xaif_booster().

template<typename Prop_t , typename Ad_graph_t >
void angel::write_edge_property ( ostream &  stream,
const string &  s,
const Prop_t &  prop,
const Ad_graph_t &  adg 
)

Write internal edge property to stream.

Parameters
stream
sCommenting string
propEdge property
adgC-graph or line graph

Definition at line 424 of file angel_io.hpp.

void angel::write_face ( ostream &  stream,
line_graph_t::face_t  face,
const line_graph_t &  lg 
)

Write a face face of lg to stream.

Referenced by write_face(), and write_face_vector().

void angel::write_face ( line_graph_t::face_t  face,
const line_graph_t &  lg 
)
inline

Write a face face of lg to standard output.

Definition at line 57 of file angel_io.hpp.

References write_face().

Here is the call graph for this function:

void angel::write_face ( std::ostream &  stream,
line_graph_t::face_t  face,
const line_graph_t &  lg 
)

Definition at line 86 of file angel_io.cpp.

References THROW_DEBUG_EXCEPT_MACRO.

void angel::write_face_vector ( ostream &  stream,
const string &  s,
const vector< line_graph_t::face_t > &  v,
const line_graph_t &  lg 
)

Write a vector v of faces from lg to stream with comment s.

Referenced by write_face_vector().

void angel::write_face_vector ( const string &  s,
const vector< line_graph_t::face_t > &  v,
const line_graph_t &  lg 
)
inline

Write a vector v of faces from lg to standard output with comment s.

Definition at line 68 of file angel_io.hpp.

References write_face_vector().

Here is the call graph for this function:

void angel::write_face_vector ( std::ostream &  stream,
const std::string &  s,
const std::vector< line_graph_t::face_t > &  v,
const line_graph_t &  lg 
)

Definition at line 101 of file angel_io.cpp.

References write_face().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::write_graph ( const string &  s,
const Ad_graph_t &  adg,
bool  write_edge_weight 
)
inline

Write c-graph or line graph to standard output.

Parameters
sCommenting string
adgC-graph or line graph
write_edge_weightWrite edge labels, only defined for c-graph

Definition at line 135 of file angel_io.hpp.

References write_graph().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::write_graph ( const string &  file_name,
const string &  s,
const Ad_graph_t &  adg,
bool  write_edge_weight 
)
inline

Write c-graph or line graph to file.

Parameters
file_nameFile will be overwritten
sCommenting string
adgC-graph or line graph
write_edge_weightWrite edge labels, only defined for c-graph

Definition at line 147 of file angel_io.hpp.

References write_graph().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::write_graph ( ostream &  stream,
const string &  s,
const Ad_graph_t &  adg 
)

Write c-graph or line graph to stream.

Parameters
stream
sCommenting string
adgC-graph or line graph

Definition at line 399 of file angel_io.hpp.

References write_vector().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::write_graph ( const string &  s,
const Ad_graph_t &  adg 
)
inline

Write c-graph or line graph to standard output.

Parameters
sCommenting string
adgC-graph or line graph

Definition at line 168 of file angel_io.hpp.

References write_graph().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::write_graph ( const string &  file_name,
const string &  s,
const Ad_graph_t &  adg 
)
inline

Write c-graph or line graph to file.

Parameters
file_nameFile will be overwritten
sCommenting string
adgC-graph or line graph

Definition at line 178 of file angel_io.hpp.

References write_graph().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::write_graph_eliad ( ostream &  stream,
const Ad_graph_t &  adg 
)
inline

Write c-graph or line graph in EliAD format to stream.

Parameters
stream
adgC-graph or line graph
Note
Can be read by read_graph_eliad (const char* file_name, c_graph_t& cg)

Definition at line 228 of file angel_io.hpp.

References for_all_edges().

Referenced by main(), and write_graph_eliad().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::write_graph_eliad ( const Ad_graph_t &  adg)
inline

Write c-graph or line graph in EliAD format to standard output.

Parameters
adgC-graph or line graph
Note
Can be read by read_graph_eliad (const char* file_name, c_graph_t& cg)

Definition at line 201 of file angel_io.hpp.

References write_graph_eliad().

Here is the call graph for this function:

template<typename Ad_graph_t >
void angel::write_graph_eliad ( const string &  file_name,
const Ad_graph_t &  adg 
)
inline

Write c-graph or line graph in EliAD format to file.

Parameters
file_nameFile will be overwritten
adgC-graph or line graph
Note
Can be read by read_graph_eliad (const char* file_name, c_graph_t& cg)

Definition at line 211 of file angel_io.hpp.

References write_graph_eliad().

Here is the call graph for this function:

void angel::write_graph_xaif_booster ( const accu_graph_t ag,
const vector< const LinearizedComputationalGraphVertex * > &  av,
const vector< edge_address_t > &  ae,
JacobianAccumulationExpressionList &  JAElist,
LinearizedComputationalGraph &  remainderLCG,
VertexCorrelationList &  v_cor_list,
EdgeCorrelationList &  e_cor_list 
)
template<typename It_t , typename Op_t >
std::ostream& angel::write_iterators ( std::ostream &  stream,
const std::string &  s,
It_t  begin,
It_t  end,
Op_t  op 
)

Definition at line 319 of file angel_tools.hpp.

void angel::write_refillDependences ( ostream &  stream,
const refillDependenceMap_t &  refillDependences 
)
template<typename Scalar_t >
void angel::write_vector ( ostream &  stream,
const string &  s,
const vector< Scalar_t > &  v 
)
inline

Write STL vector v to stream with comment s if their output operator is defined.

Definition at line 280 of file angel_io.hpp.

Referenced by angel::elimination_history_t< Ad_graph_t, El_spec_t >::check_sequence(), xaifBoosterCrossCountryInterface::compute_elimination_sequence(), use_heuristic_debug(), write_graph(), and write_vector().

template<typename Scalar_t >
void angel::write_vector ( const string &  s,
const vector< Scalar_t > &  v 
)
inline

Write STL vector v to standard output with comment s if their output operator is defined.

Definition at line 90 of file angel_io.hpp.

References write_vector().

Here is the call graph for this function:

template<typename Scalar_t , typename Op_t >
void angel::write_vector ( ostream &  stream,
const string &  s,
const vector< Scalar_t > &  v,
Op_t  op 
)
inline

Write STL vector to stream.

Parameters
stream
sCommenting string
vVector
opOutput operator, op (s, v[i]) must write element v[i] to s

Definition at line 296 of file angel_io.hpp.

template<typename Scalar_t , typename Op_t >
void angel::write_vector ( const string &  s,
const vector< Scalar_t > &  v,
Op_t  op 
)
inline

Write STL vector to standard output.

Parameters
sstring
vVector
opOutput operator, op (s, v[i]) must write element v[i] to s

Definition at line 110 of file angel_io.hpp.

References write_vector().

Here is the call graph for this function:

template<typename Prop_t , typename Ad_graph_t >
void angel::write_vertex_property ( ostream &  stream,
const string &  s,
const Prop_t &  prop,
const Ad_graph_t &  adg 
)

Write internal vertex property to stream.

Parameters
stream
sCommenting string
propVertex property
adgC-graph or line graph

Definition at line 248 of file angel_io.hpp.

Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence(), convert_elimination_sequence(), lex_less_face(), and angel::momrf_op_t::operator()().

const LinearizedComputationalGraphEdge* angel::xaif_edge_pr ( line_graph_t::edge_t  e,
const accu_graph_t ag,
const vector< edge_address_t > &  ae 
)
inline

Definition at line 118 of file xaif_interface.cpp.

References angel::accu_graph_t::lg, and angel::line_graph_t::x().

Referenced by write_graph_xaif_booster().

Here is the call graph for this function:

Variable Documentation

string_stream_output_t angel::cout_string_output(std::cout)
vis_display_output_t angel::cout_vis_display_output(std::cout)
forward_mode_edge_t angel::forward_mode_edge

Forward mode in edge elimination (mixed front and back elimination)

Parameters
ev1Set of edges that can be eliminated and how
cgc-graph
ev2Result vector of edges, contains lowest edge in lexicographical order
Returns
Size of ev2, always 1 (if ev1 is not empty)

If lowest edge appears twice in ev1 than front elimination is used. Mixed edge forward mode is realised such that the same eliminations are effectively done as in vertex and face elimination when forward mode is used as sole criterion.

Definition at line 499 of file heuristics.cpp.

Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence().

forward_mode_face_t angel::forward_mode_face

Forward mode in face elimination.

Parameters
fv1Set of faces that can be eliminated
lgLine graph
fv2Result vector of faces, contains face with lowest number (see description)
Returns
Size of fv2, always 1 (if fv1 is not empty)

In terms of vertex numbers, each face has a representation (i, j, k) (whereby several faces may have the same triplet). Faces are compared lexicographically with j as first criterion followed by i and k. It is equivalent to forward mode in vertex elimination and edge elimination (with front elimination only or mixed eliminations) when forward mode is used as sole criterion.

Definition at line 904 of file heuristics.cpp.

forward_mode_vertex_t angel::forward_mode_vertex

Forward mode in vertex elimination.

Parameters
vv1Set of vertices that can be eliminated
cgc-graph
vv2Result vector of vertices, contains vertex with lowest number
Returns
Size of vv2, always 1 (if vv1 is not empty)

Definition at line 44 of file heuristics.cpp.

Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence().

lmmd_edge_t angel::lmmd_edge(1.0)

Predefined object of lmmd_edge_t with weight=1.0.

This object is introduced for syntactical coherence with other heuristics since lmmd_edge can be called like a function.

lmmd_vertex_t angel::lmmd_vertex(1.0)

Predefined object of lmmd_vertex_t with weight=1.0.

This object is introduced for syntactical coherence with other heuristics since lmmd_vertex can be called like a function.

Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence().

ofstream angel::log_file

Definition at line 117 of file angel_io.cpp.

Referenced by close_log_file(), and open_log_file().

lowest_fill_in_vertex_t angel::lowest_fill_in_vertex

Lowest fill-in in vertex elimination.

Parameters
vv1Set of vertices that can be eliminated
cgc-graph
vv2Set of vertices whose elimination induces miniminal fill-in
Returns
Size of vv2

Definition at line 191 of file heuristics.cpp.

lowest_markowitz_edge_t angel::lowest_markowitz_edge

Lowest Markowitz in edge elimination (mixed front and back elimination)

Parameters
ev1Set of edges that can be eliminated and how
cgc-graph
ev2Result vector of edges with lowest Markowitz degree
Returns
Size of ev2

Definition at line 598 of file heuristics.cpp.

Referenced by lowestMarkowitzEdgeElim().

lowest_markowitz_face_t angel::lowest_markowitz_face

Lowest Markowitz for face elimination.

Parameters
fv1Set of faces that can be eliminated
lgLine graph
fv2Set of faces with the lowest Markowitz degree (see description)
Returns
Size of fv2

In terms of vertex numbers, each face has a representation (i, j, k) (whereby several faces may have the same triplet). With this representation the definition of Markowitz degree can be generalized to line graphs. The Markowitz degree of vertex j in line graph is the number of faces with j as second value, Markowitz(j) = |{(*, j, *)}| For all vertices j where some face like (*, j, *) exist in fv1, the Markowitz degrees are computed and their minimum determined. Returned are all faces from fv1 where j has minimal Markowitz degree.

lowest_markowitz_vertex_t angel::lowest_markowitz_vertex

Lowest Markowitz degree first in vertex elimination.

Parameters
vv1Set of vertices that can be eliminated
cgc-graph
vv2Set of vertices with lowest Markowitz degree
Returns
Size of vv2

Definition at line 82 of file heuristics.cpp.

Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence().

lowest_relative_markowitz_edge_t angel::lowest_relative_markowitz_edge

Lowest relative Markowitz in edge elimination (mixed front and back elimination)

Parameters
ev1Set of edges that can be eliminated and how
cgc-graph
ev2Result vector of edges with lowest relative Markowitz degree
Returns
Size of ev2

Definition at line 629 of file heuristics.cpp.

lowest_relative_markowitz_vertex_t angel::lowest_relative_markowitz_vertex

Lowest relative Markowitz degree first in vertex elimination.

Parameters
vv1Set of vertices that can be eliminated
cgc-graph
vv2Set of vertices with lowest relative Markowitz degree
Returns
Size of vv2

Definition at line 110 of file heuristics.cpp.

minimal_distance_edge_t angel::minimal_distance_edge

Definition at line 843 of file heuristics.cpp.

momr_edge_t angel::momr_edge

Maximal overall Markowitz reduction in mixed edge elimination.

Parameters
ev1Set of edges that can be eliminated and how
cgc-graph
ev2Result vector of edges with maximal overall Markowitz reduction
Returns
Size of ev2

Definition at line 815 of file heuristics.cpp.

momr_face_t angel::momr_face

Maximal overall Markowitz degree reduction in face elimination.

Parameters
fv1Set of faces that can be eliminated
lgline graph
fv2Set of faces with maximal overall Markowitz degree reduction
Returns
Size of fv2

Implemenation rests on an old definition of face elimination. It is not yet tested whether it works properly . In face elimination MOMR and LMMD are identical.

Definition at line 1110 of file heuristics.cpp.

momr_vertex_t angel::momr_vertex

Instance of momr_vertex_t, can be used as a function and an argument.

Definition at line 371 of file heuristics.cpp.

Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence().

moplr_vertex_t angel::moplr_vertex

Maximal overall path length reduction in vertex elimination.

Parameters
vv1Set of vertices that can be eliminated
cgc-graph
vv2Set of vertices with maximal overall path length reduction
Returns
Size of vv2

Definition at line 451 of file heuristics.cpp.

no_output_t angel::no_output

Definition at line 128 of file angel_io.cpp.

random_init_t angel::random_init_object

Definition at line 331 of file graph_generator.cpp.

reverse_mode_edge_t angel::reverse_mode_edge

Reverse mode in edge elimination (mixed front and back elimination)

Parameters
ev1Set of edges that can be eliminated and how
cgc-graph
ev2Result vector of edges, contains lowest edge in lexicographical order
Returns
Size of ev2, always 1 (if ev1 is not empty)

If lowest edge appears twice in ev1 than front elimination is used. Mixed edge reverse mode is realised such that the same eliminations are effectively done as in vertex and face elimination when reverse mode is used as sole criterion.

Definition at line 552 of file heuristics.cpp.

Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence(), and reverseModeEdgeElim().

reverse_mode_face_t angel::reverse_mode_face

Reverse mode in face elimination.

Parameters
fv1Set of faces that can be eliminated
lgLine graph
fv2Result vector of faces, contains face with highest number (see description)
Returns
Size of fv2, always 1 (if fv1 is not empty)

In terms of vertex numbers, each face has a representation (i, j, k) (whereby several faces may have the same triplet). Faces are compared lexicographically with j as first criterion followed by i and k. It is equivalent to reverse mode in vertex elimination and edge elimination (with front elimination only or mixed eliminations) when reverse mode is used as sole criterion.

Definition at line 925 of file heuristics.cpp.

Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence_lsa_face().

reverse_mode_face_whole_vertex_t angel::reverse_mode_face_whole_vertex

Reverse mode emulating vertex elimination with face eliminations.

Parameters
fv1Set of faces that can be eliminated
lgLine graph
fv2Set of faces that belong to vertex with the highest number (see description)
Returns
Size of fv2

In terms of vertex numbers, each face has a representation (i, j, k) (whereby several faces may have the same triplet). All faces with highest j are returned.

Definition at line 946 of file heuristics.cpp.

reverse_mode_vertex_t angel::reverse_mode_vertex

Reverse mode in vertex elimination.

Parameters
vv1Set of vertices that can be eliminated
cgc-graph
vv2Result vector of vertices, contains vertex with highest number
Returns
Size of vv2, always 1 (if vv1 is not empty)

Definition at line 63 of file heuristics.cpp.

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