class_docstr: Maintains an approximate pareto front of ConjectureData objects. That
  is, we try to maintain a collection of objects such that no element of the
  collection is pareto dominated by any other. In practice we don't quite
  manage that, because doing so is computationally very expensive. Instead
  we maintain a random sample of data objects that are "rarely" dominated by
  any other element of the collection (roughly, no more than about 10%).
  
  Only valid test cases are considered to belong to the pareto front - any
  test case with a status less than valid is discarded.
  
  Note that the pareto front is potentially quite large, and currently this
  will store the entire front in memory. This is bounded by the number of
  valid examples we run, which is max_examples in normal execution, and
  currently we do not support workflows with large max_examples which have
  large values of max_examples very well anyway, so this isn't a major issue.
  In future we may weish to implement some sort of paging out to disk so that
  we can work with larger fronts.
  
  Additionally, because this is only an approximate pareto front, there are
  scenarios where it can be much larger than the actual pareto front. There
  isn't a huge amount we can do about this - checking an exact pareto front
  is intrinsically quadratic.
  
  "Most" of the time we should be relatively close to the true pareto front,
  say within an order of magnitude, but it's not hard to construct scenarios
  where this is not the case. e.g. suppose we enumerate all valid test cases
  in increasing shortlex order as s_1, ..., s_n, ... and have scores f and
  g such that f(s_i) = min(i, N) and g(s_i) = 1 if i >= N, then the pareto
  front is the set {s_1, ..., S_N}, but the only element of the front that
  will dominate s_i when i > N is S_N, which we select with probability
  1 / N. A better data structure could solve this, but at the cost of more
  expensive operations and higher per element memory use, so we'll wait to
  see how much of a problem this is in practice before we try that.
class_docstr_tok: ["Maintains","an","approximate","pareto","front","of","ConjectureData","objects",".","That","is",",","we","try","to","maintain","a","collection","of","objects","such","that","no","element","of","the","collection","is","pareto","dominated","by","any","other",".","In","practice","we","do","n't","quite","manage","that",",","because","doing","so","is","computationally","very","expensive",".","Instead","we","maintain","a","random","sample","of","data","objects","that","are","``","rarely","''","dominated","by","any","other","element","of","the","collection","(","roughly",",","no","more","than","about","10","%",")",".","Only","valid","test","cases","are","considered","to","belong","to","the","pareto","front","-","any","test","case","with","a","status","less","than","valid","is","discarded",".","Note","that","the","pareto","front","is","potentially","quite","large",",","and","currently","this","will","store","the","entire","front","in","memory",".","This","is","bounded","by","the","number","of","valid","examples","we","run",",","which","is","max_examples","in","normal","execution",",","and","currently","we","do","not","support","workflows","with","large","max_examples","which","have","large","values","of","max_examples","very","well","anyway",",","so","this","is","n't","a","major","issue",".","In","future","we","may","weish","to","implement","some","sort","of","paging","out","to","disk","so","that","we","can","work","with","larger","fronts",".","Additionally",",","because","this","is","only","an","approximate","pareto","front",",","there","are","scenarios","where","it","can","be","much","larger","than","the","actual","pareto","front",".","There","is","n't","a","huge","amount","we","can","do","about","this","-","checking","an","exact","pareto","front","is","intrinsically","quadratic",".","``","Most","''","of","the","time","we","should","be","relatively","close","to","the","true","pareto","front",",","say","within","an","order","of","magnitude",",","but","it","'s","not","hard","to","construct","scenarios","where","this","is","not","the","case",".","e.g",".","suppose","we","enumerate","all","valid","test","cases","in","increasing","shortlex","order","as","s_1",",","...",",","s_n",",","...","and","have","scores","f","and","g","such","that","f","(","s_i",")","=","min","(","i",",","N",")","and","g","(","s_i",")","=","1","if","i",">","=","N",",","then","the","pareto","front","is","the","set","{","s_1",",","...",",","S_N","}",",","but","the","only","element","of","the","front","that","will","dominate","s_i","when","i",">","N","is","S_N",",","which","we","select","with","probability","1","\/","N.","A","better","data","structure","could","solve","this",",","but","at","the","cost","of","more","expensive","operations","and","higher","per","element","memory","use",",","so","we","'ll","wait","to","see","how","much","of","a","problem","this","is","in","practice","before","we","try","that","."]
docstr: Register a listener function that will be called with data when it
  gets removed from the front because something else dominates it.
docstr_tok: ["Register","a","listener","function","that","will","be","called","with","data","when","it","gets","removed","from","the","front","because","something","else","dominates","it","."]
code: def on_evict(self, f):
      """Register a listener function that will be called with data when it
      gets removed from the front because something else dominates it.
      """
      self.__eviction_listeners.append(f)
  
file_path: catboost/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/pareto.py
imports: from enum import Enum
  from sortedcontainers import SortedList
  from hypothesis.internal.conjecture.data import ConjectureData, ConjectureResult, Status
  from hypothesis.internal.conjecture.junkdrawer import LazySequenceCopy, swap
  from hypothesis.internal.conjecture.shrinker import sort_key
label_desc: Use image node_id 3 for calling the ParetoFront obj's underlying member method code with example usage: obj.on_evict(f) without return types