Source code for prefsampling

__author__ = "Simon Rey and Stanisław Szufa"
__email__ = ""
__version__ = "0.1.21"

from enum import Enum
from itertools import chain

from prefsampling.approval import SetDistance
from prefsampling.ordinal import TreeSampler
from prefsampling.core.euclidean import EuclideanSpace

[docs] class CONSTANTS(Enum): """All constants of the package""" _ignore_ = "member cls" cls = vars() for member in chain(list(TreeSampler), list(SetDistance), list(EuclideanSpace)): if in cls: raise ValueError( f"The name {} is used in more than one enumeration. The" f"CONSTANTS class needs unique names to be well-defined." ) cls[] = member.value