# Path: catsim/simulation.py
# class Initializer(Simulable, metaclass=ABCMeta):
#     """Base class for CAT initializers"""
# 
#     def __init__(self):
#         super().__init__()
# 
#     @abstractmethod
#     def initialize(self, index: int) -> float:
#         """Selects an examinee's initial :math:`\\theta` value
# 
#         :param index: the index of the current examinee
#         :returns: examinee's initial :math:`\\theta` value
#         """
#         pass


import numpy
from .simulation import Initializer
                        (in this particular order)."""

    def __str__(self):
        return "Random Initializer"

    def __init__(self, dist_type: str = "uniform", dist_params: tuple = (-5, 5)):
        super(RandomInitializer, self).__init__()

        available_distributions = ["uniform", "normal"]
        if dist_type not in available_distributions:
            raise ValueError(
                "{0} not in available distributions {1}".format(dist_type, available_distributions)
            )

        self._dist_type = dist_type
        self._dist_params = dist_params

    def initialize(self, index: int = None, **kwargs) -> float:
        """Generates a value using the chosen distribution and parameters

        :param index: the index of the current examinee. This parameter is not used by this method.
        :returns: a ability value generated from the chosen distribution using the passed parameters"""
        if self._dist_type == "uniform":
            theta = numpy.random.uniform(min(self._dist_params), max(self._dist_params))
        elif self._dist_type == "normal":
            theta = numpy.random.normal(self._dist_params[0], self._dist_params[1])

        return theta



# Path: catsim/simulation.py
# class Initializer(Simulable, metaclass=ABCMeta):
#     """Base class for CAT initializers"""
# 
#     def __init__(self):
#         super().__init__()
# 
#     @abstractmethod
#     def initialize(self, index: int) -> float:
#         """Selects an examinee's initial :math:`\\theta` value
# 
#         :param index: the index of the current examinee
#         :returns: examinee's initial :math:`\\theta` value
#         """
#         pass


# Path: catsim/initialization.py
import numpy
from .simulation import Initializer

                        (in this particular order)."""

    def __str__(self):
        return "Random Initializer"

    def __init__(self, dist_type: str = "uniform", dist_params: tuple = (-5, 5)):
        super(RandomInitializer, self).__init__()

        available_distributions = ["uniform", "normal"]
        if dist_type not in available_distributions:
            raise ValueError(
                "{0} not in available distributions {1}".format(dist_type, available_distributions)
            )

        self._dist_type = dist_type
        self._dist_params = dist_params

    def initialize(self, index: int = None, **kwargs) -> float:
        """Generates a value using the chosen distribution and parameters

        :param index: the index of the current examinee. This parameter is not used by this method.
        :returns: a ability value generated from the chosen distribution using the passed parameters"""
        if self._dist_type == "uniform":
            theta = numpy.random.uniform(min(self._dist_params), max(self._dist_params))
        elif self._dist_type == "normal":
            theta = numpy.random.normal(self._dist_params[0], self._dist_params[1])

        return theta



class FixedPointInitializer(Initializer):