angel
mercurial changeset: <a href="http://mercurial.mcs.anl.gov/ad/RoseFE_angel/rev/b18cec041a55" target="_parent">b18cec041a55</a>
|
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 |
adaption on maximal min-max-difference More... | |
class | gamma_adaption_average_t |
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_t > | edge_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_t & | operator<< (no_output_t &out, const Value_t &) |
template<class Value_t > | |
string_stream_output_t & | operator<< (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 ¤tElimSeq, refillDependenceMap_t &refillDependences) |
unsigned int | front_elim (c_graph_t::edge_t e, c_graph_t &angelLCG, const elimSeq_cost_t ¤tElimSeq, refillDependenceMap_t &refillDependences) |
unsigned int | back_elim (c_graph_t::edge_t e, c_graph_t &angelLCG, const elimSeq_cost_t ¤tElimSeq, 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 |
Namespace for the complete library.
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.
Definition at line 741 of file eliminations.hpp.
typedef std::vector<edge_ij_elim_t> angel::edge_ij_elim_seq_t |
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.
typedef std::vector<edge_pair_elim_t> angel::edge_pair_elim_seq_t |
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.
typedef boost::property<EdgeType, int, edge_index_weight_property> angel::edge_type_index_weight_property |
Definition at line 60 of file angel_types.hpp.
typedef vector<edge_vertex_elim_t> angel::edge_vertex_elim_seq_t |
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.
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.
typedef std::map< uint_pair_t, vertex_set_t > angel::refillDependenceMap_t |
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.
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.
typedef std::set<c_graph_t::vertex_t> angel::vertex_set_t |
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.
enum angel::Edge_Type_E |
Enumerator | |
---|---|
VARIABLE_EDGE | |
UNIT_EDGE | |
CONSTANT_EDGE |
Definition at line 48 of file angel_types.hpp.
enum angel::EdgeRefType_E |
Enumerator | |
---|---|
LCG_EDGE | |
JAE_VERT | |
UNDEFINED |
Definition at line 682 of file angel_types.hpp.
enum angel::vertex_type_t |
Vertex type for vertex_t in c_graph_t and edge_t in line_graph_t.
Definition at line 41 of file angel_types.hpp.
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().
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.
object | Some state in the configuration space. |
neighbor | Neighborhood relation applicable to object |
costs | Cost operator applicable to object |
adaption | Operator that can change |
gamma | Initial in LSA |
max_iter | Maximal number of iterations |
ALSA is LSA with the difference that can be changed adaptively. The adaption operator records the costs and may change on this base. Another difference to LSA is that is passed by reference (instead of by value) in order to give feedback about the adaption.
Definition at line 51 of file sa_impl.hpp.
References random().
|
inline |
Applies heuristic and uses output visitor write costs and graphs for every elimination.
adg | c-graph or line graph |
el_seq | Obtained elimination sequence |
h | Heuristic or combination of heuristics |
output | Visitor to where written is |
Definition at line 1307 of file heuristics.hpp.
References eliminatable_objects(), and eliminate().
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().
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().
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().
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().
int angel::back_edge_elimination | ( | c_graph_t::edge_t | e, |
c_graph_t & | cg | ||
) |
Back elimination of edge e
from c-graph cg
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().
|
inline |
Back elimination of edge from vertex i
to vertex j
from c-graph cg
Definition at line 90 of file eliminations.hpp.
References back_edge_elimination(), and edge().
|
inline |
Back elimination of edge from vertex with number i
to vertex with number j
from c-graph cg
Definition at line 103 of file eliminations.hpp.
References back_edge_elimination().
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().
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().
unsigned int angel::back_elim | ( | c_graph_t::edge_t | e, |
c_graph_t & | angelLCG, | ||
const elimSeq_cost_t & | currentElimSeq, | ||
refillDependenceMap_t & | refillDependences | ||
) |
Definition at line 822 of file eliminations.cpp.
References dependent, pair_elim(), and vertex_type().
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), and xaifBoosterCrossCountryInterface::computeEliminationSequenceRandom().
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().
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.
e | the edge that will be back eliminated. |
angelLCG | the c_graph_t (passed by reference) that the elimination is performed on. |
edge_ref_list | the stl list container that keeps track of the reference (LCG pointer or JAE pointer) for each edge in angelLCG. |
jae_list | the xaifBooster JAE list that we construct incrementally as we perform eliminations. |
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().
unsigned int angel::backEdgeElimination_noJAE | ( | c_graph_t::edge_t | e, |
c_graph_t & | angelLCG, | ||
const transformationSeq_cost_t * | currentTransformationSequence, | ||
refillDependenceMap_t & | refillDependences | ||
) |
Definition at line 937 of file eliminations.cpp.
References dependent, pairElim_noJAE(), and vertex_type().
Referenced by xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random(), and replay_transformation_seq().
|
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().
void angel::block2loop | ( | const c_graph_t & | block, |
int | loops, | ||
c_graph_t & | loop | ||
) |
Generates a DAG that represents a loop over the block.
block | The used block |
loops | The number of loops |
loop | The 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().
|
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().
int angel::chooseEdgeElimRandomlyGreedy | ( | std::vector< double > & | deltaE) |
Definition at line 432 of file angel_tools.cpp.
References ECONST, and gen_prob().
unsigned int angel::chooseTarget_sa | ( | std::vector< double > & | deltaE) |
Randomly chooses an index into the vector deltaE
.
deltaE | a vector of changes in energy. Normalized probabilities are calculated for each entry |
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().
|
inline |
Definition at line 476 of file angel_io.hpp.
References log_file.
|
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().
|
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().
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().
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().
|
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 | ) |
|
inline |
Replaces edge function of BGL.
u | Source |
v | Target |
g | Graph |
Definition at line 397 of file angel_types.hpp.
Referenced by assessPairElim(), back_edge_elimination(), edge_elim_effect(), edge_elimination(), face_elimination(), fme_obj(), front_edge_elimination(), getEdge(), multiply_edge_pair_directly(), angel::edge_ij_elim_heuristic_t< Edge_heuristic_t >::operator()(), angel::triplet_heuristic_t< Face_heuristic_t >::operator()(), oplr_face(), pair_elim(), pairElim_noJAE(), permutate_vertices(), postroute_edge_directly(), postrouteEdge_noJAE(), preroute_edge_directly(), prerouteEdge_noJAE(), read_graph_eliad(), reducing_reroutings(), remove_parallel_edges(), reroutable_edges(), reroute_effect(), and rme_obj().
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().
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().
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
.
be | edge elimination target under consideration |
angelLCG | c-graph |
ourAwarenessLevel | setting such as unit aware, constant aware, or no awareness |
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
.
ee | edge elimination target under consideration |
angelLCG | The linearized computational graph |
ourAwarenessLevel | setting such as unit aware, constant aware, or no awareness |
|
inline |
Front elimination of edge e
from c-graph cg
if front=true
otherwise back eliminination
Definition at line 109 of file eliminations.hpp.
References back_edge_elimination(), and front_edge_elimination().
Referenced by edge_elimination(), and eliminate().
|
inline |
Front elimination of edge e.first
from c-graph cg
if e.second=true
otherwise back eliminination
Definition at line 118 of file eliminations.hpp.
References back_edge_elimination(), and front_edge_elimination().
|
inline |
Front elimination of edge from vertex i
to vertex j
from c-graph cg
if front=true
otherwise back eliminination
Definition at line 127 of file eliminations.hpp.
References back_edge_elimination(), and front_edge_elimination().
|
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
Definition at line 138 of file eliminations.hpp.
References back_edge_elimination(), and front_edge_elimination().
|
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.
|
inline |
Eliminate sequence seq
of edges from c-graph cg
Definition at line 161 of file eliminations.hpp.
References edge(), and edge_elimination().
|
inline |
Eliminate sequence seq
of edges from c-graph cg
Definition at line 171 of file eliminations.hpp.
References edge_elimination().
|
inline |
Eliminate sequence seq
of edges from c-graph cg
Definition at line 181 of file eliminations.hpp.
References edge_elimination().
|
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().
|
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().
|
inline |
Eliminate sequence seq
of edges from line graph lg
.
Definition at line 267 of file eliminations.hpp.
References edge(), and edge_elimination().
|
inline |
Vertex pair representation of an edge in line graph.
e | Edge from line graph |
lg | Line graph |
i | Vertex number of edge source in c-graph (output) |
j | Vertex 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().
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().
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().
int angel::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
.
In fact it only copies the edges into a vector for better treatment.
Referenced by all_viable_transformations(), xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), xaifBoosterCrossCountryInterface::computeEliminationSequenceRandom(), eliminatable_objects(), postProcessRemainderGraph(), and reducing_transformations().
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().
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().
|
inline |
Synonym of eliminatable_vertices for usage in templates.
Definition at line 540 of file eliminations.hpp.
References eliminatable_vertices().
Referenced by apply_heuristic(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::complete_sequence(), angel::neighbor_last_removable_t::operator()(), angel::neighbor_multi_step_t::operator()(), angel::neighbor_sequence_check_t::operator()(), angel::neighbor_check_meta_t::operator()(), use_heuristic(), use_heuristic_debug(), use_heuristic_noconst(), and use_heuristic_trace().
|
inline |
Synonym of eliminatable_edges for usage in templates.
Definition at line 546 of file eliminations.hpp.
References eliminatable_edges().
|
inline |
Synonym of eliminatable_edges for usage in templates.
Definition at line 552 of file eliminations.hpp.
References eliminatable_edges().
|
inline |
Synonym of eliminatable_edges for usage in templates.
Definition at line 558 of file eliminations.hpp.
References eliminatable_edges().
|
inline |
Synonym of eliminatable_faces for usage in templates.
Definition at line 564 of file eliminations.hpp.
References eliminatable_faces().
|
inline |
Synonym of eliminatable_triplets for usage in templates.
Definition at line 570 of file eliminations.hpp.
References eliminatable_triplets().
|
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().
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().
|
inline |
Overloaded elimination for templates, here vertex elimination in c-graph.
Definition at line 422 of file eliminations.hpp.
References vertex_elimination().
Referenced by apply_heuristic(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::check_sequence(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::elimination(), angel::neighbor_last_removable_t::operator()(), angel::neighbor_multi_step_t::operator()(), angel::neighbor_sequence_check_t::operator()(), angel::neighbor_check_meta_t::operator()(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::rebuild_graph(), use_heuristic(), use_heuristic_debug(), use_heuristic_noconst(), and use_heuristic_trace().
|
inline |
Overloaded elimination for templates, here vertex elimination in c-graph.
Definition at line 426 of file eliminations.hpp.
References vertex_elimination().
|
inline |
Overloaded elimination for templates, here vertex elimination in line graph.
Definition at line 430 of file eliminations.hpp.
References vertex_elimination().
|
inline |
Overloaded elimination for templates, here vertex elimination in c-graph.
Definition at line 434 of file eliminations.hpp.
References edge_elimination().
|
inline |
Overloaded elimination for templates, here vertex elimination in c-graph.
Definition at line 439 of file eliminations.hpp.
References edge_elimination().
|
inline |
Overloaded elimination for templates, here face elimination in line graph
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().
|
inline |
Overloaded elimination for templates, here face elimination in line graph
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().
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
f | the face |
kr | is 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. |
lg | the line graph |
ac | is a container for graphs representing the accumulation code |
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().
|
inline |
Eliminate face f
from line graph lg
f | the face |
kr | is 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. |
lg | the line graph |
Definition at line 305 of file eliminations.hpp.
References angel::line_graph_t::cgp, and face_elimination().
|
inline |
Eliminate face f
from line graph lg
Definition at line 312 of file eliminations.hpp.
References face_elimination().
|
inline |
Eliminate face from line graph
i | node number of the source of the face |
j | node number of the source of the face |
lg | the line graph |
Definition at line 321 of file eliminations.hpp.
References edge(), and face_elimination().
|
inline |
Eliminate face from line graph
i | node number of the source of the face |
j | node number of the source of the face |
kr | is 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. |
lg | the line graph |
Definition at line 340 of file eliminations.hpp.
References edge(), and face_elimination().
|
inline |
Definition at line 346 of file eliminations.hpp.
References edge(), and face_elimination().
|
inline |
Eliminate face from line graph
t | a triplet of node number (i, j, kr), for meaning of kr see parameter lists of other face elimination functions |
lg | the line graph |
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.
|
inline |
Eliminate face from line graph
t | a triplet of node number (i, j, kr), for meaning of kr see parameter lists of other face elimination functions |
lg | the line graph |
ac | is a container for graphs representing the accumulation code |
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.
|
inline |
Vertex triplet representation of a face.
f | face |
lg | Line graph |
i | Vertex number of face source in c-graph (output) |
j | Vertex number of face center in c-graph (output) |
k | Vertex 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()().
|
inline |
Definition at line 639 of file heuristics.cpp.
References new_in_edges().
Referenced by lowest_fill_in_edge_f().
|
inline |
Definition at line 635 of file heuristics.cpp.
References new_out_edges().
Referenced by lowest_fill_in_edge_f().
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.
|
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().
|
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()().
|
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()().
|
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().
|
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.
|
inline |
Applies op
to all in-edges of v
, graph can be changed.
Definition at line 135 of file angel_tools.hpp.
|
inline |
Applies op
to all out-edges of v
, graph can be changed.
Definition at line 144 of file angel_tools.hpp.
|
inline |
Forward mode in back edge elimination.
ev1 | Set of edges that can be eliminated |
cg | c-graph |
ev2 | Result vector of edges, contains lowest edge in lexicographical order |
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().
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.
ev1 | Set of edges that can be eliminated |
front | Used for front elimination if true, otherwise for back elimination |
cg | c-graph |
ev2 | Result vector of edges, contains lowest edge in lexicographical order |
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().
|
inline |
Forward mode in front edge elimination.
ev1 | Set of edges that can be eliminated |
cg | c-graph |
ev2 | Result vector of edges, contains lowest edge in lexicographical order |
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().
int angel::front_edge_elimination | ( | c_graph_t::edge_t | e, |
c_graph_t & | cg | ||
) |
Front elimination of edge e
from c-graph cg
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().
|
inline |
Front elimination of edge from vertex i
to vertex j
from c-graph cg
Definition at line 62 of file eliminations.hpp.
References edge(), and front_edge_elimination().
|
inline |
Front elimination of edge from vertex with number i
to vertex with number j
from c-graph cg
Definition at line 76 of file eliminations.hpp.
References front_edge_elimination().
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().
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().
unsigned int angel::front_elim | ( | c_graph_t::edge_t | e, |
c_graph_t & | angelLCG, | ||
const elimSeq_cost_t & | currentElimSeq, | ||
refillDependenceMap_t & | refillDependences | ||
) |
Definition at line 794 of file eliminations.cpp.
References pair_elim().
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), and xaifBoosterCrossCountryInterface::computeEliminationSequenceRandom().
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().
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.
e | the edge that will be front eliminated. |
angelLCG | the c_graph_t (passed by reference) that the elimination is performed on. |
edge_ref_list | the stl list container that keeps track of the reference (LCG pointer or JAE pointer) for each edge in angelLCG. |
jae_list | the xaifBooster JAE list that we construct incrementally as we perform eliminations. |
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().
unsigned int angel::frontEdgeElimination_noJAE | ( | c_graph_t::edge_t | e, |
c_graph_t & | angelLCG, | ||
const transformationSeq_cost_t * | currentTransformationSequence, | ||
refillDependenceMap_t & | refillDependences | ||
) |
Definition at line 909 of file eliminations.cpp.
References pairElim_noJAE().
Referenced by xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random(), and replay_transformation_seq().
|
inline |
Metropolis with fixed temperature in a general form.
object | Some state in the configuration space. |
neighbor | Neighborhood relation applicable to object |
costs | Cost operator applicable to object |
t | temperature |
max_iter | Maximal 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.
Definition at line 125 of file sa.hpp.
References SA().
double angel::gen_prob | ( | ) |
Returns a random number between zero and one.
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().
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.
cg | c-graph |
vni | Number of all incoming paths for each vertex |
vli | Overall path length of all incoming paths for each vertex |
vno | Number of all outgoing paths for each vertex |
vlo | Overall path length of all outgoing paths for each vertex |
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().
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().
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().
|
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().
|
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().
|
inline |
Tests if cg
is bi-partite.
Definition at line 599 of file angel_tools.hpp.
References dependent, independent, and vertex_type().
|
inline |
Tests if lg
is tri-partite.
Definition at line 609 of file angel_tools.hpp.
References dependent, independent, and vertex_type().
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().
|
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().
|
inline |
Definition at line 450 of file angel_tools.hpp.
|
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()().
|
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 | ||
) |
Definition at line 78 of file angel_tools.cpp.
References write_graph(), and write_vertex_property().
Referenced by angel::lex_less_face_line_t::operator()(), angel::not_lex_less_face_line_t::operator()(), angel::forward_mode_face_t::operator()(), and angel::reverse_mode_face_t::operator()().
lmmd_edge_t angel::lmmd_edge | ( | 1. | 0) |
|
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()().
|
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()().
lmmd_vertex_t angel::lmmd_vertex | ( | 1. | 0) |
|
inline |
Lowest fill-in in back edge elimination.
ev1 | Set of edges that can be eliminated |
cg | c-graph |
ev2 | Result vector of edges with lowest fill-in |
Edges in ev1 that cannot be back eliminated are ignored.
Definition at line 633 of file heuristics.hpp.
References lowest_fill_in_edge_f().
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.
ev1 | Set of edges that can be eliminated |
front | Used for front elimination if true, otherwise for back elimination |
cg | c-graph |
ev2 | Result vector of edges with lowest fill-in |
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().
|
inline |
Lowest fill-in in front edge elimination.
ev1 | Set of edges that can be eliminated |
cg | c-graph |
ev2 | Result vector of edges with lowest fill-in |
Edges in ev1 that cannot be front eliminated are ignored.
Definition at line 619 of file heuristics.hpp.
References lowest_fill_in_edge_f().
|
inline |
Lowest Markowitz in back edge elimination.
ev1 | Set of edges that can be eliminated |
cg | c-graph |
ev2 | Result vector of edges with lowest Markowitz degree |
Edges in ev1 that cannot be back eliminated are ignored.
Definition at line 485 of file heuristics.hpp.
References lowest_markowitz_edge_f().
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.
ev1 | Set of edges that can be eliminated |
front | Used for front elimination if true, otherwise for back elimination |
cg | c-graph |
ev2 | Result vector of edges with lowest Markowitz degree |
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().
|
inline |
Lowest Markowitz in front edge elimination.
ev1 | Set of edges that can be eliminated |
cg | c-graph |
ev2 | Result vector of edges with lowest Markowitz degree |
Edges in ev1 that cannot be front eliminated are ignored.
Definition at line 470 of file heuristics.hpp.
References lowest_markowitz_edge_f().
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().
|
inline |
Lowest relative Markowitz in back edge elimination.
ev1 | Set of edges that can be eliminated |
cg | c-graph |
ev2 | Result vector of edges with lowest relative Markowitz degree |
Edges in ev1 that cannot be back eliminated are ignored.
Definition at line 560 of file heuristics.hpp.
References lowest_relative_markowitz_edge_f().
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.
ev1 | Set of edges that can be eliminated |
front | Used for front elimination if true, otherwise for back elimination |
cg | c-graph |
ev2 | Result vector of edges with lowest relative Markowitz degree |
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().
|
inline |
Lowest relative Markowitz in front edge elimination.
ev1 | Set of edges that can be eliminated |
cg | c-graph |
ev2 | Result vector of edges with lowest relative Markowitz degree |
Edges in ev1 that cannot be front eliminated are ignored.
Definition at line 546 of file heuristics.hpp.
References lowest_relative_markowitz_edge_f().
unsigned int angel::lowestMarkowitzEdgeElim | ( | const vector< EdgeElim > & | inEEV, |
const c_graph_t & | angelLCG, | ||
vector< EdgeElim > & | outEEV | ||
) |
Definition at line 1381 of file heuristics.cpp.
References lowest_markowitz_edge.
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), and lowest_markowitz_transformations().
|
inline |
Logarithmic Simulated Annealing in a general form.
object | Some state in the configuration space. |
neighbor | Neighborhood relation applicable to object |
costs | Cost operator applicable to object |
gamma | in LSA |
max_iter | Maximal 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.
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().
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().
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.
bev1 | set of edges that can be eliminated |
angelLCG | c-graph |
ourAwarenessLevel | needed to assess costs of eliminations |
bev2 | set of edge elims that don't increase the nontrivial edge count |
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().
int angel::markowitz_degree | ( | int | j, |
const line_graph_t & | lg | ||
) |
Markowitz.
j | Vertex number in c-graph |
lg | Line graph |
Definition at line 385 of file angel_types.cpp.
References dependent, independent, THROW_DEBUG_EXCEPT_MACRO, and vertex_type().
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()().
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()().
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()().
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.
void angel::markowitz_on_line_graph | ( | const line_graph_t & | lg, |
vector< int > & | mdegree | ||
) |
Definition at line 952 of file heuristics.cpp.
Referenced by angel::lmf_op_t::lmf_op_t(), and angel::lowest_markowitz_face_complete_t< Heuristic_t >::operator()().
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().
|
inline |
Definition at line 703 of file angel_tools.hpp.
References maximal_paths().
Referenced by minimal_markowitz_degree().
|
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().
|
inline |
Maximal overall Markowitz reduction in back edge elimination.
ev1 | Set of edges that can be eliminated |
cg | c-graph |
ev2 | Result vector of edges with maximal overall Markowitz reduction |
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()().
|
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.
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.
ev1 | Set of edges that can be eliminated |
front | Used for front elimination if true, otherwise for back elimination |
cg | c-graph |
ev2 | Result vector of edges with maximal overall Markowitz reduction |
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().
|
inline |
Maximal overall Markowitz reduction in front edge elimination.
ev1 | Set of edges that can be eliminated |
cg | c-graph |
ev2 | Result vector of edges with maximal overall Markowitz reduction |
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()().
|
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.
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.
ev1 | Set of edges that can be eliminated and how |
front | indicates if the edge is to be front eliminated |
cg | c-graph |
ev2 | Result vector of edges with maximal path length reduction |
Definition at line 849 of file heuristics.cpp.
References in_out_path_lengths(), oplr_edge_back(), and oplr_edge_front().
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.
e1 | the first edge. |
e2 | the second edge (its source is the target of e1 ). |
angelLCG | the c_graph_t (passed by reference) that the operation is performed on. |
edge_ref_list | the stl list container that keeps track of the reference (LCG pointer or JAE pointer) for each edge in angelLCG. |
jae_list | the xaifBooster JAE list that we construct incrementally as we perform eliminations. |
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().
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 | ||
) |
Definition at line 143 of file heuristics.cpp.
Referenced by fill_in_front(), markowitz_enlargement_front(), and angel::fiv_op_t::operator()().
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().
unsigned int angel::num_nontrivial_edges | ( | const c_graph_t & | angelLCG, |
const AwarenessLevel::AwarenessLevel_E | ourAwarenessLevel | ||
) |
Definition at line 232 of file xaif_interface.cpp.
References UNIT_EDGE, and VARIABLE_EDGE.
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random(), and replay_transformation_seq().
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().
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) |
Definition at line 246 of file xaif_interface.cpp.
References intermediate, and vertex_type().
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), and xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence().
unsigned int angel::numIntermediateVerticesWithoutUnitEdge | ( | const c_graph_t & | angelLCG) |
Definition at line 254 of file xaif_interface.cpp.
References intermediate, UNIT_EDGE, and vertex_type().
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), and xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence().
|
inline |
Definition at line 465 of file angel_io.hpp.
References log_file.
|
inline |
Compares two c-graphs.
Definition at line 230 of file angel_types.hpp.
|
inline |
Compares two line graphs.
Definition at line 438 of file angel_types.hpp.
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.
|
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.
no_output_t& angel::operator<< | ( | no_output_t & | out, |
const Value_t & | |||
) |
Definition at line 492 of file angel_io.hpp.
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.
|
inline |
Output operator of edge_pair_elim_t.
Definition at line 589 of file angel_types.hpp.
References angel::edge_pair_elim_t::front, angel::edge_pair_elim_t::i, and angel::edge_pair_elim_t::j.
|
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.
|
inline |
Definition at line 639 of file angel_types.hpp.
References angel::accu_exp_t::add, angel::accu_exp_t::exp, angel::accu_exp_t::ref_t::exp_nr, angel::accu_exp_t::isop, angel::accu_exp_t::lgn, angel::accu_exp_t::ref_t::node, angel::accu_exp_t::nothing, angel::accu_exp_t::ref_t::op, angel::accu_exp_t::ref, and angel::accu_exp_t::ref_kind.
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().
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().
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().
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()().
|
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().
void angel::ourLCG_to_angelLCG | ( | const LinearizedComputationalGraph & | ourLCG, |
vector< const LinearizedComputationalGraphVertex * > & | ourLCG_verts, | ||
c_graph_t & | angelLCG, | ||
list< EdgeRef_t > & | edge_ref_list | ||
) |
Definition at line 273 of file xaif_interface.cpp.
References CONSTANT_EDGE, angel::c_graph_t::dependents, THROW_EXCEPT_MACRO, UNIT_EDGE, VARIABLE_EDGE, which_index(), write_graph(), and angel::c_graph_t::x().
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random(), and xaifBoosterCrossCountryInterface::computeEliminationSequenceRandom().
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().
|
inline |
Sum of minimal Markowitz degrees.
Definition at line 720 of file angel_tools.hpp.
References minimal_markowitz_degree().
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 | ||
) |
Definition at line 739 of file eliminations.cpp.
References CONSTANT_EDGE, edge(), angel::elimSeq_cost_t::edgeElimVector, angel::c_graph_t::next_edge_number, angel::elimSeq_cost_t::revealedNewDependence, UNIT_EDGE, and VARIABLE_EDGE.
Referenced by back_elim(), and front_elim().
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 | ||
) |
Definition at line 850 of file eliminations.cpp.
References CONSTANT_EDGE, edge(), angel::c_graph_t::next_edge_number, angel::transformationSeq_cost_t::revealedNewDependence, angel::transformationSeq_cost_t::transformationVector, UNIT_EDGE, and VARIABLE_EDGE.
Referenced by backEdgeElimination_noJAE(), and frontEdgeElimination_noJAE().
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().
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 | ||
) |
Definition at line 344 of file xaif_interface.cpp.
References CONSTANT_EDGE, getJAE_p(), getLCG_p(), getRefType(), JAE_VERT, LCG_EDGE, THROW_EXCEPT_MACRO, UNIT_EDGE, and VARIABLE_EDGE.
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random(), and xaifBoosterCrossCountryInterface::computeEliminationSequenceRandom().
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.
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().
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 | ||
) |
Definition at line 372 of file reroutings.cpp.
References CONSTANT_EDGE, angel::edge_reroute_t::e, edge(), angel::c_graph_t::next_edge_number, angel::edge_reroute_t::pivot_e, removeRef(), setJaevRef(), UNIT_EDGE, and VARIABLE_EDGE.
unsigned int angel::postrouteEdge_noJAE | ( | edge_reroute_t | er, |
c_graph_t & | angelLCG | ||
) |
Definition at line 563 of file reroutings.cpp.
References CONSTANT_EDGE, angel::edge_reroute_t::e, edge(), angel::c_graph_t::next_edge_number, angel::edge_reroute_t::pivot_e, UNIT_EDGE, and VARIABLE_EDGE.
Referenced by xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random(), and replay_transformation_seq().
|
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 | ||
) |
Definition at line 237 of file reroutings.cpp.
References CONSTANT_EDGE, angel::edge_reroute_t::e, edge(), angel::c_graph_t::next_edge_number, angel::edge_reroute_t::pivot_e, removeRef(), setJaevRef(), UNIT_EDGE, and VARIABLE_EDGE.
unsigned int angel::prerouteEdge_noJAE | ( | edge_reroute_t | er, |
c_graph_t & | angelLCG | ||
) |
Definition at line 506 of file reroutings.cpp.
References CONSTANT_EDGE, angel::edge_reroute_t::e, edge(), angel::c_graph_t::next_edge_number, angel::edge_reroute_t::pivot_e, UNIT_EDGE, and VARIABLE_EDGE.
Referenced by xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random(), and replay_transformation_seq().
|
inline |
Sets all edge labels (in ew) to 1.
Definition at line 748 of file angel_tools.hpp.
|
inline |
Sets all vertex labels (in ed) to 1.
Definition at line 741 of file angel_tools.hpp.
|
inline |
Random value between min
and max
, i.e. from [min, max].
Definition at line 521 of file angel_tools.hpp.
Referenced by ALSA(), angel::neighbor_last_removable_t::operator()(), angel::neighbor_multi_step_t::operator()(), angel::neighbor_sequence_check_t::operator()(), angel::neighbor_check_meta_t::operator()(), random(), random_statement(), random_statement_vector(), SA(), and stats2block().
|
inline |
Random value from [0, n)
Definition at line 525 of file angel_tools.hpp.
|
inline |
Random value between 0 and n-1, i.e. from [0, n)
Definition at line 529 of file angel_tools.hpp.
|
inline |
Random number characterized by p
, the accumulated probabities.
Definition at line 544 of file angel_tools.hpp.
References random(), and THROW_EXCEPT_MACRO.
void angel::random_block | ( | int | inputs, |
int | outputs, | ||
int | stats, | ||
int | max_exp, | ||
double | unary, | ||
c_graph_t & | block | ||
) |
Generates a random basic block.
inputs | The number of the block's inputs |
outputs | The number of the block's outputs |
stats | The number of statements |
max_exp | The maximal number of expressions in each statement |
unary | The portion of unary expressions, the remainder are binary. |
block | The resulting block |
Definition at line 245 of file graph_generator.cpp.
References random_statement_vector(), and stats2block().
|
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.
void angel::random_statement | ( | int | inputs, |
int | expr, | ||
const std::vector< double > & | p, | ||
c_graph_t & | statement | ||
) |
Generates a random statement.
inputs | The number of inputs |
expr | The number of expressions |
p | Probability vector (see description) |
statement | The resulting statement |
The number of an expression's input is characterized by p
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.
max_expr | The maximal number of expressions in each statement |
unary | The portion of unary expressions, the remainder are binary. |
statement_vector | The 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().
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().
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.
void angel::read_graph_xaif_booster | ( | const LinearizedComputationalGraph & | xg, |
c_graph_t & | cg, | ||
vector< const LinearizedComputationalGraphVertex * > & | av, | ||
vector< edge_address_t > & | ae | ||
) |
Definition at line 42 of file xaif_interface.cpp.
References CONSTANT_EDGE, angel::c_graph_t::dependents, THROW_EXCEPT_MACRO, UNIT_EDGE, VARIABLE_EDGE, which_index(), write_graph(), and angel::c_graph_t::X.
Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_elimination_sequence_lsa_face(), and xaifBoosterCrossCountryInterface::compute_elimination_sequence_lsa_vertex().
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().
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.
bev1 | set of edges that can be eliminated |
angelLCG | c-graph |
ourAwarenessLevel | needed to assess costs of eliminations |
bev2 | set of edge elims that decrease the nontrivial edge count |
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 | ||
) |
Definition at line 1500 of file heuristics.cpp.
References dependent, angel::edge_reroute_t::e, edge(), angel::edge_reroute_t::increment_eliminatable, angel::edge_reroute_t::isPre, angel::edge_reroute_t::pivot_e, angel::edge_reroute_t::pivot_eliminatable, reroute_effect(), angel::edge_reroute_t::type3EdgeElimVector, UNIT_EDGE, VARIABLE_EDGE, and vertex_type().
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().
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).
bev1 | set of edges that can be eliminated |
angelLCG | c-graph |
refillDependences | partial map of edges to a set of vertices that lie on paths from the edge sources to the edge targets, used to anticipate refill. |
bev2 | set of edge elims that dont violate refill dependences (returned by reference) |
Definition at line 1272 of file heuristics.cpp.
References reachable().
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), and refill_avoiding_transformations().
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().
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().
|
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().
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().
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.
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().
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().
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 | ||
) |
Definition at line 601 of file eliminations.cpp.
References THROW_EXCEPT_MACRO.
Referenced by back_eliminate_edge_directly(), front_eliminate_edge_directly(), multiply_edge_pair_directly(), postroute_edge_directly(), and preroute_edge_directly().
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 | ||
) |
Definition at line 419 of file xaif_interface.cpp.
References backEdgeElimination_noJAE(), frontEdgeElimination_noJAE(), num_nontrivial_edges(), postrouteEdge_noJAE(), and prerouteEdge_noJAE().
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), and xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random().
void angel::reroutable_edges | ( | c_graph_t & | angelLCG, |
vector< edge_reroute_t > & | erv | ||
) |
Populates a list of all viable edge reroutings in angelLCG
.
angelLCG | the c_graph_t (passed by reference) that the operation is performed on. |
erv | empty list that will hold all pre-routings and post-routings in angelLCG . |
erv
(by reference). Definition at line 20 of file reroutings.cpp.
References edge(), and reachable().
Referenced by all_viable_transformations(), and reroutable_edges().
unsigned int angel::reroutable_edges | ( | c_graph_t & | angelLCG, |
vector< Rerouting > & | allReroutingsV | ||
) |
Definition at line 96 of file reroutings.cpp.
References reroutable_edges().
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.
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().
|
inline |
Reverse mode in back edge elimination.
ev1 | Set of edges that can be eliminated |
cg | c-graph |
ev2 | Result vector of edges, contains lowest edge in lexicographical order |
Edges in ev1 that cannot be back eliminated are ignored.
Definition at line 403 of file heuristics.hpp.
References reverse_mode_edge_f().
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.
ev1 | Set of edges that can be eliminated |
front | Used for front elimination if true, otherwise for back elimination |
cg | c-graph |
ev2 | Result vector of edges, contains highest edge in lexicographical order |
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().
|
inline |
Reverse mode in front edge elimination.
ev1 | Set of edges that can be eliminated |
cg | c-graph |
ev2 | Result vector of edges, contains lowest edge in lexicographical order |
Edges in ev1 that cannot be front eliminated are ignored.
Definition at line 389 of file heuristics.hpp.
References reverse_mode_edge_f().
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().
bool angel::reverseModeEdgeElim | ( | const vector< EdgeElim > & | inEEV, |
const c_graph_t & | angelLCG, | ||
vector< EdgeElim > & | outEEV | ||
) |
Definition at line 1401 of file heuristics.cpp.
References reverse_mode_edge.
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), and reverse_mode_transformations().
|
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()().
int angel::SA | ( | Object_t & | object, |
Neighbor_t | neighbor, | ||
Cost_t | costs, | ||
Temp_t | temp, | ||
int | max_iter | ||
) |
Simulated Annealing in a general form.
object | Some state in the configuration space. |
neighbor | Neighborhood relation applicable to object |
costs | Cost operator applicable to object |
temp | Temperature operator depending on iteration number, e.g. LOG_temperature_t |
max_iter | Maximal 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.
Definition at line 19 of file sa_impl.hpp.
References random(), and SA_acceptance().
Referenced by FTSA(), and LSA().
|
inline |
|
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()().
|
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().
|
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().
|
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().
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().
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().
|
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().
|
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().
int angel::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.
Definition at line 152 of file heuristics_impl.hpp.
References angel::base_heuristic_t< Objective_t >::set_objective(), and angel::base_heuristic_t< Objective_t >::to_maximize().
Referenced by angel::lowest_markowitz_vertex_t::operator()(), angel::lowest_relative_markowitz_vertex_t::operator()(), angel::lowest_fill_in_vertex_t::operator()(), angel::lmmd_vertex_t::operator()(), angel::momr_vertex_t::operator()(), angel::moplr_vertex_t::operator()(), angel::lowest_markowitz_edge_t::operator()(), angel::lowest_relative_markowitz_edge_t::operator()(), angel::lmmd_edge_t::operator()(), angel::momr_edge_t::operator()(), angel::minimal_distance_edge_t::operator()(), angel::lowest_markowitz_face_t::operator()(), angel::momr_face_t::operator()(), and angel::minimal_distance_face_t::operator()().
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.
inputs | The number of the block's inputs |
outputs | The number of the block's outputs |
stats | List of statements |
block | The 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().
|
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().
|
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()().
|
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().
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 | ||
) |
Definition at line 1737 of file heuristics.cpp.
References edge_elim_effect(), angel::Transformation::getEdgeElim(), angel::Rerouting::getER(), angel::Transformation::getRerouting(), angel::Transformation::isRerouting(), and reroute_effect().
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().
|
inline |
Use heuristic to transform c-/line graph into bi-/tri-partite graph.
adg | c-graph or line graph |
el_seq | Obtained elimination sequence |
h | Heuristic or combination of heuristics |
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.
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()().
|
inline |
Debugging version of use_heuristic, several outputs.
adg | c-graph or line graph |
el_seq | Obtained elimination sequence |
h | Heuristic or combination of heuristics |
Definition at line 1225 of file heuristics.hpp.
References eliminatable_objects(), eliminate(), write_graph(), and write_vector().
|
inline |
Use heuristic to transform c-/line graph into bi-/tri-partite graph.
adg | c-graph or line graph |
el_seq | Obtained elimination sequence |
h | Heuristic or combination of heuristics |
Same as use_heuristic but the graph is changed not copied.
Definition at line 1195 of file heuristics.hpp.
References eliminatable_objects(), and eliminate().
|
inline |
Tracing version of use_heuristic, writes costs for every elimination.
adg | c-graph or line graph |
el_seq | Obtained elimination sequence |
h | Heuristic or combination of heuristics |
output |
Definition at line 1271 of file heuristics.hpp.
References eliminatable_objects(), and eliminate().
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.
|
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
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().
|
inline |
Elimination of vertex with number j
from c-graph cg
Definition at line 44 of file eliminations.hpp.
References vertex_elimination().
int angel::vertex_elimination | ( | const vector< int > & | seq, |
c_graph_t & | cg | ||
) |
Elimination of vertices in sequence seq
from c-graph cg
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().
vertex_type_t angel::vertex_type | ( | typename Ad_graph_t::vertex_descriptor | v, |
const Ad_graph_t & | adg | ||
) |
Functional equivalent for graph class method (more boost-like)
Definition at line 355 of file angel_tools.hpp.
Referenced by assessBackEdgeElim(), assessFrontEdgeElim(), back_edge_elimination(), back_elim(), back_eliminatable_edges(), back_eliminate_edge_directly(), backEdgeElimination_noJAE(), angel::c_graph_t::check(), angel::c_graph_t::check_initial(), edge_elim_effect(), eliminatable_edges(), eliminatable_faces(), front_eliminatable_edges(), is_bipartite(), angel::line_graph_t::is_tripartite(), is_tripartite(), markowitz_degree(), markowitz_enlargement_front(), minimal_markowitz_degree(), numIntermediateVertices(), numIntermediateVerticesWithoutUnitEdge(), angel::new_pik_t::operator()(), angel::source_not_independent_t::operator()(), angel::new_iks_t::operator()(), angel::target_not_dependent_t::operator()(), overall_markowitz_degree(), reducing_reroutings(), and writeVertexAndEdgeTypes().
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.
|
inline |
Returns whether face elimination induces an operation during Jacobian accumulation
i | node number of the source of the face |
j | node number of the source of the face |
k | is the number of a new node or the number of the node absorbing the face |
lg | the line graph |
Definition at line 393 of file eliminations.hpp.
References angel::line_graph_t::v().
Referenced by eliminate(), and was_non_trivial_elimination().
|
inline |
Returns whether face elimination induces an operation during Jacobian accumulation
f | the face |
k | is the number of a new node or the number of the node absorbing the face |
lg | the line graph |
Definition at line 407 of file eliminations.hpp.
References was_non_trivial_elimination().
|
inline |
Definition at line 30 of file xaif_interface.cpp.
Referenced by ourLCG_to_angelLCG(), and read_graph_xaif_booster().
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.
stream | |
s | Commenting string |
prop | Edge property |
adg | C-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().
|
inline |
Write a face face
of lg
to standard output.
Definition at line 57 of file angel_io.hpp.
References write_face().
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().
|
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().
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().
void angel::write_graph | ( | ostream & | stream, |
const string & | s, | ||
const Ad_graph_t & | adg, | ||
bool | write_edge_weight | ||
) |
Write c-graph or line graph to stream.
stream | |
s | Commenting string |
adg | C-graph or line graph |
write_edge_weight | Write edge labels, only defined for c-graph |
Definition at line 358 of file angel_io.hpp.
References write_vector().
Referenced by angel::c_graph_t::check(), angel::elimination_history_t< Ad_graph_t, El_spec_t >::check_sequence(), xaifBoosterCrossCountryInterface::compute_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random(), xaifBoosterCrossCountryInterface::computeEliminationSequenceRandom(), convert_elimination_sequence(), lex_less_face(), angel::momrf_op_t::operator()(), ourLCG_to_angelLCG(), random_statement_vector(), read_graph_xaif_booster(), use_heuristic_debug(), write_graph(), and angel::stream_output_t::write_graph().
|
inline |
Write c-graph or line graph to standard output.
s | Commenting string |
adg | C-graph or line graph |
write_edge_weight | Write edge labels, only defined for c-graph |
Definition at line 135 of file angel_io.hpp.
References write_graph().
|
inline |
Write c-graph or line graph to file.
file_name | File will be overwritten |
s | Commenting string |
adg | C-graph or line graph |
write_edge_weight | Write edge labels, only defined for c-graph |
Definition at line 147 of file angel_io.hpp.
References write_graph().
void angel::write_graph | ( | ostream & | stream, |
const string & | s, | ||
const Ad_graph_t & | adg | ||
) |
Write c-graph or line graph to stream.
stream | |
s | Commenting string |
adg | C-graph or line graph |
Definition at line 399 of file angel_io.hpp.
References write_vector().
|
inline |
Write c-graph or line graph to standard output.
s | Commenting string |
adg | C-graph or line graph |
Definition at line 168 of file angel_io.hpp.
References write_graph().
|
inline |
Write c-graph or line graph to file.
file_name | File will be overwritten |
s | Commenting string |
adg | C-graph or line graph |
Definition at line 178 of file angel_io.hpp.
References write_graph().
|
inline |
Write c-graph or line graph in EliAD format to stream.
stream | |
adg | C-graph or line graph |
Definition at line 228 of file angel_io.hpp.
References for_all_edges().
Referenced by main(), and write_graph_eliad().
|
inline |
Write c-graph or line graph in EliAD format to standard output.
adg | C-graph or line graph |
Definition at line 201 of file angel_io.hpp.
References write_graph_eliad().
|
inline |
Write c-graph or line graph in EliAD format to file.
file_name | File will be overwritten |
adg | C-graph or line graph |
Definition at line 211 of file angel_io.hpp.
References write_graph_eliad().
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 | ||
) |
Definition at line 129 of file xaif_interface.cpp.
References angel::accu_graph_t::accu_exp, angel::accu_exp_t::add, angel::accu_exp_t::exp, angel::accu_exp_t::ref_t::exp_nr, angel::accu_exp_t::isop, angel::accu_graph_t::jacobi_entries, JAE_VERT, angel::accu_exp_t::lgn, angel::accu_exp_t::ref_t::node, angel::accu_exp_t::nothing, angel::accu_exp_t::ref_t::op, angel::accu_exp_t::ref, angel::accu_exp_t::ref_kind, THROW_DEBUG_EXCEPT_MACRO, THROW_EXCEPT_MACRO, angel::accu_exp_graph_t::v(), and xaif_edge_pr().
Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_elimination_sequence_lsa_face(), and xaifBoosterCrossCountryInterface::compute_elimination_sequence_lsa_vertex().
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 | ||
) |
Definition at line 136 of file angel_io.cpp.
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), and xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence().
|
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().
|
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().
|
inline |
Write STL vector to stream.
stream | |
s | Commenting string |
v | Vector |
op | Output operator, op (s, v[i]) must write element v[i] to s |
Definition at line 296 of file angel_io.hpp.
|
inline |
Write STL vector to standard output.
s | string |
v | Vector |
op | Output operator, op (s, v[i]) must write element v[i] to s |
Definition at line 110 of file angel_io.hpp.
References write_vector().
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.
stream | |
s | Commenting string |
prop | Vertex property |
adg | C-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()().
void angel::writeVertexAndEdgeTypes | ( | ostream & | stream, |
c_graph_t & | angelLCG | ||
) |
Definition at line 148 of file angel_io.cpp.
References CONSTANT_EDGE, dependent, UNIT_EDGE, VARIABLE_EDGE, and vertex_type().
Referenced by xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence(), xaifBoosterCrossCountryInterface::compute_partial_elimination_sequence_random(), xaifBoosterCrossCountryInterface::compute_partial_transformation_sequence_random(), and xaifBoosterCrossCountryInterface::computeEliminationSequenceRandom().
|
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().
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)
ev1 | Set of edges that can be eliminated and how |
cg | c-graph |
ev2 | Result vector of edges, contains lowest edge in lexicographical order |
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.
fv1 | Set of faces that can be eliminated |
lg | Line graph |
fv2 | Result vector of faces, contains face with lowest number (see description) |
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.
vv1 | Set of vertices that can be eliminated |
cg | c-graph |
vv2 | Result vector of vertices, contains vertex with lowest number |
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.
vv1 | Set of vertices that can be eliminated |
cg | c-graph |
vv2 | Set of vertices whose elimination induces miniminal fill-in |
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)
ev1 | Set of edges that can be eliminated and how |
cg | c-graph |
ev2 | Result vector of edges with lowest Markowitz degree |
Definition at line 598 of file heuristics.cpp.
Referenced by lowestMarkowitzEdgeElim().
lowest_markowitz_face_t angel::lowest_markowitz_face |
Lowest Markowitz for face elimination.
fv1 | Set of faces that can be eliminated |
lg | Line graph |
fv2 | Set of faces with the lowest Markowitz degree (see description) |
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.
vv1 | Set of vertices that can be eliminated |
cg | c-graph |
vv2 | Set of vertices with lowest Markowitz degree |
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)
ev1 | Set of edges that can be eliminated and how |
cg | c-graph |
ev2 | Result vector of edges with lowest relative Markowitz degree |
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.
vv1 | Set of vertices that can be eliminated |
cg | c-graph |
vv2 | Set of vertices with lowest relative Markowitz degree |
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.
ev1 | Set of edges that can be eliminated and how |
cg | c-graph |
ev2 | Result vector of edges with maximal overall Markowitz reduction |
Definition at line 815 of file heuristics.cpp.
momr_face_t angel::momr_face |
Maximal overall Markowitz degree reduction in face elimination.
fv1 | Set of faces that can be eliminated |
lg | line graph |
fv2 | Set of faces with maximal overall Markowitz degree reduction |
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.
vv1 | Set of vertices that can be eliminated |
cg | c-graph |
vv2 | Set of vertices with maximal overall path length reduction |
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)
ev1 | Set of edges that can be eliminated and how |
cg | c-graph |
ev2 | Result vector of edges, contains lowest edge in lexicographical order |
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.
fv1 | Set of faces that can be eliminated |
lg | Line graph |
fv2 | Result vector of faces, contains face with highest number (see description) |
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.
fv1 | Set of faces that can be eliminated |
lg | Line graph |
fv2 | Set of faces that belong to vertex with the highest number (see description) |
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.
vv1 | Set of vertices that can be eliminated |
cg | c-graph |
vv2 | Result vector of vertices, contains vertex with highest number |
Definition at line 63 of file heuristics.cpp.
Referenced by xaifBoosterCrossCountryInterface::compute_elimination_sequence(), and xaifBoosterCrossCountryInterface::compute_elimination_sequence_lsa_vertex().