# Path: dynts/dsl/functions/registry.py
# def composeFunction(name, comp, description='', docs=''):
#     attrs = {
#         'composite': comp,
#         '__doc__': docs,
#         'description': description
#     }
#     return ASTFunctionMeta(name, (CompositeBase,), attrs)
# 
# Path: dynts/dsl/functions/simple.py
# class ScalarWindowFunction(ScalarFunction):
#     abstract = True
# 
#     def get_name(self, arg, window, **kwargs):
#         return '%s(%s,window=%s)' % (self.name, arg, window)


from .registry import composeFunction
from .simple import ScalarWindowFunction



composeFunction(
    'sdd',
    'sd(delta(x1),window=20)',
    docs='''\
This is a shortcut function for calculating the standard deviation
of changes. Therefore:

.. math::

    {\\tt sdd}(y_t,w) = {\tt sd}({\\tt delta}(y_t),w)
''',
    description='standard deviation of changes'
)



# Path: dynts/dsl/functions/registry.py
# def composeFunction(name, comp, description='', docs=''):
#     attrs = {
#         'composite': comp,
#         '__doc__': docs,
#         'description': description
#     }
#     return ASTFunctionMeta(name, (CompositeBase,), attrs)
# 
# Path: dynts/dsl/functions/simple.py
# class ScalarWindowFunction(ScalarFunction):
#     abstract = True
# 
#     def get_name(self, arg, window, **kwargs):
#         return '%s(%s,window=%s)' % (self.name, arg, window)


# Path: dynts/dsl/functions/composite.py
from .registry import composeFunction
from .simple import ScalarWindowFunction



composeFunction(
    'sdd',
    'sd(delta(x1),window=20)',
    docs='''\
This is a shortcut function for calculating the standard deviation
of changes. Therefore:

.. math::

    {\\tt sdd}(y_t,w) = {\tt sd}({\\tt delta}(y_t),w)
''',
    description='standard deviation of changes'
)



composeFunction(
