diff --git a/mapmap/header/costs.h b/mapmap/header/costs.h index f47cf1c..e4743e0 100755 --- a/mapmap/header/costs.h +++ b/mapmap/header/costs.h @@ -132,7 +132,7 @@ class ModeNotSupportedException : public std::exception ModeNotSupportedException(const std::string& err_msg); ~ModeNotSupportedException(); - const char* what() const throw(); + const char* what() const noexcept; protected: std::string m_err_msg; diff --git a/mapmap/header/dynamic_programming.h b/mapmap/header/dynamic_programming.h old mode 100755 new mode 100644 index 4cf8ce3..952e3bf --- a/mapmap/header/dynamic_programming.h +++ b/mapmap/header/dynamic_programming.h @@ -78,7 +78,7 @@ class CombinatorialDynamicProgramming : ~CombinatorialDynamicProgramming(); _s_t optimize( - std::vector<_iv_st>& solution) throw(); + std::vector<_iv_st>& solution); protected: void discover_leaves(); diff --git a/mapmap/header/graph.h b/mapmap/header/graph.h old mode 100755 new mode 100644 index 872a534..9ab5f0f --- a/mapmap/header/graph.h +++ b/mapmap/header/graph.h @@ -40,7 +40,7 @@ class Graph ~Graph(); void add_edge(const luint_t node_a, const luint_t node_b, - const scalar_t weight) throw(); + const scalar_t weight); const std::vector& nodes() const; const luint_t num_nodes() const; const std::vector& inc_edges(const luint_t node) const; diff --git a/mapmap/header/mapmap.h b/mapmap/header/mapmap.h old mode 100755 new mode 100644 index 3446de6..dad26f2 --- a/mapmap/header/mapmap.h +++ b/mapmap/header/mapmap.h @@ -66,15 +66,14 @@ class mapMAP ~mapMAP(); /* set graph and label set */ - void set_graph(Graph * graph) throw(); - void set_label_set(const LabelSet * label_set) - throw(); + void set_graph(Graph * graph); + void set_label_set(const LabelSet * label_set); /* alternatively - construct graph and label set */ void add_edge(const luint_t node_a, const luint_t node_b, - const _s_t weight = 1.0) throw(); + const _s_t weight = 1.0); void set_node_label_set(const luint_t node_id, const - std::vector<_iv_st>& label_set) throw(); + std::vector<_iv_st>& label_set); /* set MRF cost functions (compatibility mode) */ void set_unaries(const UnaryCosts * unaries); @@ -100,11 +99,11 @@ class mapMAP /* start optimization */ _s_t optimize(std::vector<_iv_st>& - solution) throw(); + solution); /* start optimization with customized control flow */ _s_t optimize(std::vector<_iv_st>& - solution, const mapMAP_control& control_flow) throw(); + solution, const mapMAP_control& control_flow); protected: /* setup, sanity checks and tools */ diff --git a/mapmap/header/optimizer_instances/dynamic_programming.h b/mapmap/header/optimizer_instances/dynamic_programming.h index 5930b6c..39f6e2c 100755 --- a/mapmap/header/optimizer_instances/dynamic_programming.h +++ b/mapmap/header/optimizer_instances/dynamic_programming.h @@ -67,7 +67,7 @@ class CombinatorialDynamicProgramming : ~CombinatorialDynamicProgramming(); _s_t optimize( - std::vector<_iv_st>& solution) throw(); + std::vector<_iv_st>& solution); protected: void discover_leaves(); diff --git a/mapmap/header/tree_optimizer.h b/mapmap/header/tree_optimizer.h index ffd7091..959ebaf 100755 --- a/mapmap/header/tree_optimizer.h +++ b/mapmap/header/tree_optimizer.h @@ -43,7 +43,7 @@ class TreeOptimizer /* optimization procedure - returns new objective value and solution */ virtual _s_t optimize( - std::vector<_iv_st>& solution) throw() = 0; + std::vector<_iv_st>& solution) = 0; protected: bool data_complete(); diff --git a/mapmap/source/costs.impl.h b/mapmap/source/costs.impl.h index cc5962c..37305db 100755 --- a/mapmap/source/costs.impl.h +++ b/mapmap/source/costs.impl.h @@ -373,7 +373,7 @@ FORCEINLINE const char* ModeNotSupportedException:: what() -const throw() +const noexcept { return m_err_msg.c_str(); } diff --git a/mapmap/source/dynamic_programming.impl.h b/mapmap/source/dynamic_programming.impl.h index 069bcb3..5c0522f 100755 --- a/mapmap/source/dynamic_programming.impl.h +++ b/mapmap/source/dynamic_programming.impl.h @@ -335,7 +335,6 @@ _s_t CombinatorialDynamicProgramming:: optimize( std::vector<_iv_st>& solution) -throw() { if(!this->data_complete()) throw std::domain_error("Data for optimization problem " diff --git a/mapmap/source/graph.impl.h b/mapmap/source/graph.impl.h index bcc18ab..42502d3 100755 --- a/mapmap/source/graph.impl.h +++ b/mapmap/source/graph.impl.h @@ -185,7 +185,6 @@ add_edge( const luint_t node_a, const luint_t node_b, const COSTTYPE weight) -throw() { if(std::max(node_a, node_b) >= m_num_nodes) throw std::runtime_error("Graph::add_edge: " diff --git a/mapmap/source/mapmap.impl.h b/mapmap/source/mapmap.impl.h index 9bb3f6d..2edd8e3 100755 --- a/mapmap/source/mapmap.impl.h +++ b/mapmap/source/mapmap.impl.h @@ -92,7 +92,6 @@ void mapMAP:: set_graph( Graph * graph) -throw() { if(m_construct_graph) throw std::runtime_error("Setting the graph is not allowed " @@ -111,7 +110,6 @@ void mapMAP:: set_label_set( const LabelSet * label_set) -throw() { if(m_construct_graph) throw std::runtime_error("Setting the label set is not allowed " @@ -131,7 +129,6 @@ add_edge( const luint_t node_a, const luint_t node_b, const _s_t weight) -throw() { if(!m_construct_graph) throw std::runtime_error("Adding edges is only allowed " @@ -149,7 +146,6 @@ mapMAP:: set_node_label_set( const luint_t node_id, const std::vector<_iv_st>& label_set) -throw() { if(!m_construct_graph) throw std::runtime_error("Setting a label set is only allowed " @@ -278,7 +274,6 @@ _s_t mapMAP:: optimize( std::vector<_iv_st>& solution) -throw() { /* initialize control flow with standard values */ mapMAP_control std_control; @@ -305,7 +300,6 @@ mapMAP:: optimize( std::vector<_iv_st>& solution, const mapMAP_control& control_flow) -throw() { _s_t obj; diff --git a/mapmap/source/optimizer_instances/dynamic_programming.impl.h b/mapmap/source/optimizer_instances/dynamic_programming.impl.h index 59df927..be2b5d8 100755 --- a/mapmap/source/optimizer_instances/dynamic_programming.impl.h +++ b/mapmap/source/optimizer_instances/dynamic_programming.impl.h @@ -161,7 +161,6 @@ _s_t CombinatorialDynamicProgramming:: optimize( std::vector<_iv_st>& solution) -throw() { if(!this->data_complete()) throw std::domain_error("Data for optimization problem "