
    h                     D   S r / SQr " S S\5      r " S S\5      r " S S\5      r " S S	\5      r " S
 S\5      r " S S\5      r " S S\5      r	 " S S\5      r
 " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      rg)zL
**********
Exceptions
**********

Base exceptions and errors for NetworkX.
)	HasACycleNodeNotFoundPowerIterationFailedConvergenceExceededMaxIterationsAmbiguousSolutionNetworkXAlgorithmErrorNetworkXExceptionNetworkXErrorNetworkXNoCycleNetworkXNoPathNetworkXNotImplementedNetworkXPointlessConceptNetworkXUnboundedNetworkXUnfeasiblec                       \ rS rSrSrSrg)r      z&Base class for exceptions in NetworkX. N__name__
__module____qualname____firstlineno____doc____static_attributes__r       D/var/www/html/env/lib/python3.13/site-packages/networkx/exception.pyr   r      s    0r   r   c                       \ rS rSrSrSrg)r	      z)Exception for a serious error in NetworkXr   Nr   r   r   r   r	   r	      s    3r   r	   c                       \ rS rSrSrSrg)r   #   ai  Raised when a null graph is provided as input to an algorithm
that cannot use it.

The null graph is sometimes considered a pointless concept [1]_,
thus the name of the exception.

Notes
-----
Null graphs and empty graphs are often used interchangeably but they
are well defined in NetworkX. An ``empty_graph`` is a graph with ``n`` nodes
and 0 edges, and a ``null_graph`` is a graph with 0 nodes and 0 edges.

References
----------
.. [1] Harary, F. and Read, R. "Is the Null Graph a Pointless
   Concept?"  In Graphs and Combinatorics Conference, George
   Washington University.  New York: Springer-Verlag, 1973.

r   Nr   r   r   r   r   r   #   s    r   r   c                       \ rS rSrSrSrg)r   9   z3Exception for unexpected termination of algorithms.r   Nr   r   r   r   r   r   9   s    =r   r   c                       \ rS rSrSrSrg)r   =   z`Exception raised by algorithms trying to solve a problem
instance that has no feasible solution.r   Nr   r   r   r   r   r   =   s    /r   r   c                       \ rS rSrSrSrg)r   B   zkException for algorithms that should return a path when running
on graphs where such a path does not exist.r   Nr   r   r   r   r   r   B   s    3r   r   c                       \ rS rSrSrSrg)r
   G   zmException for algorithms that should return a cycle when running
on graphs where such a cycle does not exist.r   Nr   r   r   r   r
   r
   G   s    4r   r
   c                       \ rS rSrSrSrg)r   L   zVRaised if a graph has a cycle when an algorithm expects that it
will have no cycles.

r   Nr   r   r   r   r   r   L   s    r   r   c                       \ rS rSrSrSrg)r   S   zsException raised by algorithms trying to solve a maximization
or a minimization problem instance that is unbounded.r   Nr   r   r   r   r   r   S   s    =r   r   c                       \ rS rSrSrSrg)r   X   zCException raised by algorithms not implemented for a type of graph.r   Nr   r   r   r   r   r   X   s    Mr   r   c                       \ rS rSrSrSrg)r   \   z>Exception raised if requested node is not present in the graphr   Nr   r   r   r   r   r   \   s    Hr   r   c                       \ rS rSrSrSrg)r   `   a(  Raised if more than one valid solution exists for an intermediary step
of an algorithm.

In the face of ambiguity, refuse the temptation to guess.
This may occur, for example, when trying to determine the
bipartite node sets in a disconnected bipartite graph when
computing bipartite matchings.

r   Nr   r   r   r   r   r   `   s    r   r   c                       \ rS rSrSrSrg)r   l   zRaised if a loop iterates too many times without breaking.

This may occur, for example, in an algorithm that computes
progressively better approximations to a value but exceeds an
iteration bound specified by the user.

r   Nr   r   r   r   r   r   l   s    r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r   v   zRaised when the power iteration method fails to converge within a
specified iteration limit.

`num_iterations` is the number of iterations that have been
completed when this exception was raised.

c                 B   > SU S3nUn[         TU ]  nU" X/UQ70 UD6  g )Nz*power iteration failed to converge within z iterations)super__init__)selfnum_iterationsargskwmsgexception_message	superinit	__class__s          r   r8   (PowerIterationFailedConvergence.__init__   s4    :>:J+VG$	$7D7B7r   r   )r   r   r   r   r   r8   r   __classcell__)r@   s   @r   r   r   v   s    8 8r   r   N)r   __all__	Exceptionr   r	   r   r   r   r   r
   r   r   r   r   r   r   r   r   r   r   <module>rE      s   $1	 14% 40 ,>. >// /
3' 3
4( 4
! =. =
N. NI$ I	) 	- 8&; 8r   