�
H�g�� � �� � d dl Z ddlmZ G d� de� � Z G d� de� � Z G d� d e� � Z G d
� de� � Zedk rd dl Z e j
� � dS dS )
� N� )�xrangec �R � e Zd ZdZd� Zd� Zd
d�Zd
d�Zd
d�Zd� Z d � Z
d
d
�Zd
d�ZdS )�QuadratureRuleaN
Quadrature rules are implemented using this class, in order to
simplify the code and provide a common infrastructure
for tasks such as error estimation and node caching.
You can implement a custom quadrature rule by subclassing
:class:`QuadratureRule` and implementing the appropriate
methods. The subclass can then be used by :func:`~mpmath.quad` by
passing it as the *method* argument.
:class:`QuadratureRule` instances are supposed to be singletons.
:class:`QuadratureRule` therefore implements instance caching
in :func:`~mpmath.__new__`.
c �>