Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:37:27

0001 //=======================================================================
0002 // Copyright 2002 Indiana University.
0003 // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
0004 //
0005 // Distributed under the Boost Software License, Version 1.0. (See
0006 // accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 //=======================================================================
0009 
0010 #ifndef BOOST_GRAPH_EXCEPTION_HPP
0011 #define BOOST_GRAPH_EXCEPTION_HPP
0012 
0013 #include <stdexcept>
0014 #include <string>
0015 
0016 namespace boost
0017 {
0018 
0019 struct BOOST_SYMBOL_VISIBLE bad_graph : public std::invalid_argument
0020 {
0021     bad_graph(const std::string& what_arg) : std::invalid_argument(what_arg) {}
0022 };
0023 
0024 struct BOOST_SYMBOL_VISIBLE not_a_dag : public bad_graph
0025 {
0026     not_a_dag() : bad_graph("The graph must be a DAG.") {}
0027 };
0028 
0029 struct BOOST_SYMBOL_VISIBLE negative_edge : public bad_graph
0030 {
0031     negative_edge()
0032     : bad_graph("The graph may not contain an edge with negative weight.")
0033     {
0034     }
0035 };
0036 
0037 struct BOOST_SYMBOL_VISIBLE negative_cycle : public bad_graph
0038 {
0039     negative_cycle() : bad_graph("The graph may not contain negative cycles.")
0040     {
0041     }
0042 };
0043 
0044 struct BOOST_SYMBOL_VISIBLE not_connected : public bad_graph
0045 {
0046     not_connected() : bad_graph("The graph must be connected.") {}
0047 };
0048 
0049 struct BOOST_SYMBOL_VISIBLE not_complete : public bad_graph
0050 {
0051     not_complete() : bad_graph("The graph must be complete.") {}
0052 };
0053 
0054 } // namespace boost
0055 
0056 #endif // BOOST_GRAPH_EXCEPTION_HPP