class_docstr: Abstract base class for classes implementing mesh refinement.
  
  A TriRefiner encapsulates a Triangulation object and provides tools for
  mesh refinement and interpolation.
  
  Derived classes must implements:
  
      - ``refine_triangulation(return_tri_index=False, **kwargs)`` , where
        the optional keyword arguments *kwargs* are defined in each
        TriRefiner concrete implementation, and which returns :
  
            - a refined triangulation
            - optionally (depending on *return_tri_index*), for each
              point of the refined triangulation: the index of
              the initial triangulation triangle to which it belongs.
  
      - ``refine_field(z, triinterpolator=None, **kwargs)`` , where:
  
            - *z* array of field values (to refine) defined at the base
              triangulation nodes
            - *triinterpolator* is a
              :class:`~matplotlib.tri.TriInterpolator` (optional)
            - the other optional keyword arguments *kwargs* are defined in
              each TriRefiner concrete implementation
  
        and which returns (as a tuple) a refined triangular mesh and the
        interpolated values of the field at the refined triangulation nodes.
class_docstr_tok: ["Abstract","base","class","for","classes","implementing","mesh","refinement",".","A","TriRefiner","encapsulates","a","Triangulation","object","and","provides","tools","for","mesh","refinement","and","interpolation",".","Derived","classes","must","implements",":","-","``","refine_triangulation","(","return_tri_index=False",",","*","*","kwargs",")","``",",","where","the","optional","keyword","arguments","*","kwargs","*","are","defined","in","each","TriRefiner","concrete","implementation",",","and","which","returns",":","-","a","refined","triangulation","-","optionally","(","depending","on","*","return_tri_index","*",")",",","for","each","point","of","the","refined","triangulation",":","the","index","of","the","initial","triangulation","triangle","to","which","it","belongs",".","-","``","refine_field","(","z",",","triinterpolator=None",",","*","*","kwargs",")","``",",","where",":","-","*","z","*","array","of","field","values","(","to","refine",")","defined","at","the","base","triangulation","nodes","-","*","triinterpolator","*","is","a",":","class",":","`","~matplotlib.tri.TriInterpolator","`","(","optional",")","-","the","other","optional","keyword","arguments","*","kwargs","*","are","defined","in","each","TriRefiner","concrete","implementation","and","which","returns","(","as","a","tuple",")","a","refined","triangular","mesh","and","the","interpolated","values","of","the","field","at","the","refined","triangulation","nodes","."]
code: def __init__(self, triangulation):
      if not isinstance(triangulation, Triangulation):
          raise ValueError("Expected a Triangulation object")
      self._triangulation = triangulation
  
file_path: catboost/contrib/python/matplotlib/py2/matplotlib/tri/trirefine.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  import numpy
  from matplotlib.tri.triangulation import Triangulation
  import matplotlib.tri.triinterpolate
label_desc: Use image node_id 1 to create a new TriRefiner object from inherited base classes: object with example: obj = TriRefiner(triangulation)