Created
January 29, 2015 12:55
-
-
Save rexissimus/ec22b9e59301b769b2be to your computer and use it in GitHub Desktop.
minconn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
identifier = 'org.vistrails.vistrails.minconn' | |
name = 'minconn' | |
version = '0.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vistrails.core.modules.config import IPort | |
from vistrails.core.modules.vistrails_module import Module | |
class Minconn(Module): | |
_input_ports = [IPort('a', '(basic:String)'), | |
IPort('d', '(basic:String)', min_conns=1), | |
IPort('b', '(basic:String)', min_conns=1), | |
IPort('c', '(basic:String)')] | |
_output_ports = [('out', '(basic:String)')] | |
def compute(self): | |
b = self.get_input("b") | |
d = self.get_input("d") | |
self.set_output('out', b+d) | |
_modules = [Minconn] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment