# Path: reggie/core/priors.py
# PRIORS = dict()
# 
# Path: reggie/core/domains.py
# REAL = 'real'
# 
# Path: reggie/core/domains.py
# BOUNDS = {
#     REAL: (-np.inf, np.inf),
#     POSITIVE: (EPSILON, np.inf)
# }
# 
# TRANSFORMS = {
#     REAL: Identity(),
#     POSITIVE: Log()
# }


import numpy as np
import copy
import tabulate
import warnings
from collections import OrderedDict
from .priors import PRIORS
from .domains import REAL
from .domains import BOUNDS, TRANSFORMS
__all__ = ['Parameterized']


def _outbounds(bounds, theta):
    """
    Check whether a vector is inside the given bounds.
    """
    bounds = np.array(bounds, ndmin=2)
    return np.any(theta < bounds[:, 0]) or np.any(theta > bounds[:, 1])


class Parameter(object):
    """
    Representation of an array of parameters.

    A `Parameter` represents an array of continuous-valued parameters. Each
    parameter should be associated with a prior (possibly None), a block
    identifier, a default transformation, and bounds.

    Objects of this type should be used internally but should not be exposed
    outside of this module. See the `Parameters` and `Parameterized` objects
    for the externally facing code.
    """
    def __init__(self, value, domain, prior=None, block=0):
        super(Parameter, self).__init__()
        self.value = value
        self.prior = prior
        self.block = block
        self.domain = domain
        self.transform = TRANSFORMS[domain]

# Path: reggie/core/priors.py
# PRIORS = dict()
# 
# Path: reggie/core/domains.py
# REAL = 'real'
# 
# Path: reggie/core/domains.py
# BOUNDS = {
#     REAL: (-np.inf, np.inf),
#     POSITIVE: (EPSILON, np.inf)
# }
# 
# TRANSFORMS = {
#     REAL: Identity(),
#     POSITIVE: Log()
# }


# Path: reggie/core/params.py
import numpy as np
import copy
import tabulate
import warnings
from collections import OrderedDict
from .priors import PRIORS
from .domains import REAL
from .domains import BOUNDS, TRANSFORMS

__all__ = ['Parameterized']


def _outbounds(bounds, theta):
    """
    Check whether a vector is inside the given bounds.
    """
    bounds = np.array(bounds, ndmin=2)
    return np.any(theta < bounds[:, 0]) or np.any(theta > bounds[:, 1])


class Parameter(object):
    """
    Representation of an array of parameters.

    A `Parameter` represents an array of continuous-valued parameters. Each
    parameter should be associated with a prior (possibly None), a block
    identifier, a default transformation, and bounds.

    Objects of this type should be used internally but should not be exposed
    outside of this module. See the `Parameters` and `Parameterized` objects
    for the externally facing code.
    """
    def __init__(self, value, domain, prior=None, block=0):
        super(Parameter, self).__init__()
        self.value = value
        self.prior = prior
        self.block = block
        self.domain = domain
        self.transform = TRANSFORMS[domain]

        self.bounds = BOUNDS[domain]