# -*- coding: utf-8 -*-

# factory.py

# MIT License

# Copyright (c) 2017 Rene Jean Corneille

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from trendpy.strategies import *

class StrategyFactory:
	factories = {}

	@staticmethod
	def add(id,factory):
		StrategyFactory.factories.put[id] = factory

	@staticmethod
	def create(id,*args,**kwargs):
		if not id in StrategyFactory.factories:
			StrategyFactory.factories[id] = eval('%s.Factory()' % id)
		return StrategyFactory.factories[id].create(*args,**kwargs)

@@ -1259,100 +1259,456 @@
 ):%0A%09
-%09StrategyFactory.factories.put%5Bid%5D = factory%0A%0A%09@staticmethod%0A%09def create(id,*args,**kwargs):
+%22%22%22 Computes a discrete derivative matrix%0A%0A%09:param size: dimension of the matrix.%0A%09:type size: int%0A%09:param order: derivation order.%0A%09:type order: int%0A%09%22%22%22%0A%09%09StrategyFactory.factories.put%5Bid%5D = factory%0A%0A%09@staticmethod%0A%09def create(id,*args,**kwargs):%0A%09%22%22%22 Computes a discrete derivative matrix%0A%0A%09:param id: name of the class.%0A%09:type id: str%0A%09:param args: Positional arguments.%0A%09:type args: list%0A%09:param args: Keyword arguments.%0A%09:type args: dict%0A%09%22%22%22
 %0A%09%09i

Update factory.py