本文整理汇总了Python中dispel4py.core.GenericPE.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python GenericPE.__init__方法的具体用法?Python GenericPE.__init__怎么用?Python GenericPE.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dispel4py.core.GenericPE
的用法示例。
在下文中一共展示了GenericPE.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self):
GenericPE.__init__(self)
self.inputconnections['input'] = { NAME : 'input' }
out1 = {}
out1[NAME] = "output"
out1[TYPE] = ['word']
self.outputconnections["output"] = out1
示例2: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self):
GenericPE.__init__(self)
self._add_input('input')
self._add_output('output')
#self._add_output('time')
self.key_arrays = []
self.it = 1
示例3: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self):
GenericPE.__init__(self)
self._add_input("input")
self._add_output("image")
self._add_output("windows")
self._add_output("window_tapering")
示例4: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self):
GenericPE.__init__(self)
self._add_input("odd")
self._add_input("even")
self._add_output("output")
self.list_odd=[]
self.list_even=[]
示例5: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self):
GenericPE.__init__(self)
self._add_input('input', grouping=[0])
self._add_output('output')
self.dst_node_list = defaultdict(list)
self.cur_rank = defaultdict(float)
self.it = 1
示例6: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self):
GenericPE.__init__(self)
self._add_input(self.INPUT_NAME, grouping='global')
self._add_output(self.OUTPUT_NAME)
self.sum = 0
self.sum_squared = 0
self.count = 0
示例7: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self, name, wrapped):
GenericPE.__init__(name)
self.wrappedPE = wrapped
self.inputconnections = wrapped.inputconnections
self.outputconnections = wrapped.outputconnections
self.cachedInputs = {}
for name in self.inputconnections:
self.cachedInputs[name] = []
示例8: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self, numOutputs=1):
GenericPE.__init__(self)
if numOutputs == 1:
self._add_output('output', tuple_type=['number'])
else:
for i in range(numOutputs):
self._add_output('output%s' % i, tuple_type=['number'])
self.counter = 0
self.outputnames = list(self.outputconnections.keys())
示例9: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self):
GenericPE.__init__(self)
self._add_input ('input', grouping='global')
self.state = None
self.happiness={} #pair state, sentiment
self.top_number = 3
self.top_states = []
self.top_scores = []
self.total_tweets = 0
示例10: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self, input_mappings, output_mappings, proc_to_pe):
GenericPE.__init__(self)
# work out the order of PEs
self.ordered = _order_by_dependency(input_mappings, output_mappings)
self.input_mappings = input_mappings
self.output_mappings = output_mappings
self.proc_to_pe = proc_to_pe
self.result_mappings = None
self.map_inputs = _no_map
self.map_outputs = _no_map
示例11: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self, workflow, inputmappings={}, outputmappings={}):
GenericPE.__init__(self)
self.workflow = workflow
for input_name in inputmappings:
self.inputconnections[input_name] = { NAME : input_name }
for output_name in outputmappings.values():
self.outputconnections[output_name] = { NAME : output_name }
for node in workflow.graph.nodes():
pe = node.getContainedObject()
pe.log = types.MethodType(simpleLogger, pe)
self.inputmappings = inputmappings
self.outputmappings = outputmappings
示例12: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self):
GenericPE.__init__(self)
in1 = {}
in1[NAME] = INPUT_NAME
self.inputconnections[INPUT_NAME] = in1
out1 = {}
out1[TYPE] = ['streams']
out1[NAME] = OUTPUT_DATA
out_md = {}
out_md[NAME] = OUTPUT_METADATA
out_md[TYPE] = ['metadata']
self.outputconnections[OUTPUT_DATA] = out1
self.outputconnections[OUTPUT_METADATA] = out_md
self.taskId=str(uuid.uuid1())
self.controlParameters = {}
self.appParameters = {}
self.provon = True
self.iterationIndex = 0
self.instanceId = 'Invoker-instance-'+socket.gethostname()
示例13: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self, inputs=[], outputs=[], numInputs=0, numOutputs=0):
'''
:param inputs: a list of input names (optional)
:param outputs: a list of output names (optional)
:param numInputs: number of inputs; the inputs are generated as 'input0' to 'input`n`'
where `n` is the number of inputs (optional)
:param numInputs: number of outputs; the outputs are generated as 'output0' to 'output`n`'
where `n` is the number of outputs (optional)
'''
GenericPE.__init__(self)
for i in range(numInputs):
name = '%s%s' % (BasePE.INPUT_NAME, i)
self.inputconnections[name] = { NAME : name }
for i in range(numOutputs):
name = '%s%s' % (BasePE.OUTPUT_NAME, i)
self.outputconnections[name] = { NAME : name }
for name in inputs:
self.inputconnections[name] = { NAME : name }
for name in outputs:
self.outputconnections[name] = { NAME : name }
示例14: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self):
GenericPE.__init__(self)
self._add_input("input", grouping=[0])
self._add_output("output")
self.count=defaultdict(int)
示例15: __init__
# 需要导入模块: from dispel4py.core import GenericPE [as 别名]
# 或者: from dispel4py.core.GenericPE import __init__ [as 别名]
def __init__(self, *args, **kwargs):
GenericPE.__init__(self)
self.parameters = {}