Skip to content

Linking

Creates a link between one component and another using the names of the input- and output ports of the components

Source code in feral3gp/feral/core/util.py
13
14
15
16
17
18
19
20
21
def link(from_component, from_port_name, to_component, to_port_name):
    """
    Creates a link between one component and another using the names of the input- and output ports of the components
    """
    if not isinstance(from_component, java.lang.Object):
        from_component = from_component.get_java_delegate()
    if not isinstance(to_component, java.lang.Object):
        to_component = to_component.get_java_delegate()
    return JLinkAPI.createLink(from_component, from_port_name, to_component, to_port_name)

Creates a bidirectional link between two components

Source code in feral3gp/feral/core/util.py
24
25
26
27
28
29
30
31
32
def bidirectional_link(component0, port_name0, component1, port_name1):
    """
    Creates a bidirectional link between two components
    """
    if not isinstance(component0, java.lang.Object):
        component0 = component0.get_java_delegate()
    if not isinstance(component1, java.lang.Object):
        component1 = component1.get_java_delegate()
    return JLinkAPI.createBidirectionalLink(component0, port_name0, component1, port_name1)