repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_documentation_string
stringlengths
1
47.2k
func_code_url
stringlengths
85
339
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_start_event_info
def export_start_event_info(node_params, output_element): """ Adds StartEvent attributes to exported XML element :param node_params: dictionary with given intermediate catch event parameters, :param output_element: object representing BPMN XML 'intermediateCatchEvent' element. "...
python
def export_start_event_info(node_params, output_element): """ Adds StartEvent attributes to exported XML element :param node_params: dictionary with given intermediate catch event parameters, :param output_element: object representing BPMN XML 'intermediateCatchEvent' element. "...
Adds StartEvent attributes to exported XML element :param node_params: dictionary with given intermediate catch event parameters, :param output_element: object representing BPMN XML 'intermediateCatchEvent' element.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L140-L155
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_throw_event_info
def export_throw_event_info(node_params, output_element): """ Adds EndEvent or IntermediateThrowingEvent attributes to exported XML element :param node_params: dictionary with given intermediate throw event parameters, :param output_element: object representing BPMN XML 'intermediateThr...
python
def export_throw_event_info(node_params, output_element): """ Adds EndEvent or IntermediateThrowingEvent attributes to exported XML element :param node_params: dictionary with given intermediate throw event parameters, :param output_element: object representing BPMN XML 'intermediateThr...
Adds EndEvent or IntermediateThrowingEvent attributes to exported XML element :param node_params: dictionary with given intermediate throw event parameters, :param output_element: object representing BPMN XML 'intermediateThrowEvent' element.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L158-L171
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_boundary_event_info
def export_boundary_event_info(node_params, output_element): """ Adds IntermediateCatchEvent attributes to exported XML element :param node_params: dictionary with given intermediate catch event parameters, :param output_element: object representing BPMN XML 'intermediateCatchEvent' ele...
python
def export_boundary_event_info(node_params, output_element): """ Adds IntermediateCatchEvent attributes to exported XML element :param node_params: dictionary with given intermediate catch event parameters, :param output_element: object representing BPMN XML 'intermediateCatchEvent' ele...
Adds IntermediateCatchEvent attributes to exported XML element :param node_params: dictionary with given intermediate catch event parameters, :param output_element: object representing BPMN XML 'intermediateCatchEvent' element.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L174-L190
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_definitions_element
def export_definitions_element(): """ Creates root element ('definitions') for exported BPMN XML file. :return: definitions XML element. """ root = eTree.Element(consts.Consts.definitions) root.set("xmlns", "http://www.omg.org/spec/BPMN/20100524/MODEL") root.set(...
python
def export_definitions_element(): """ Creates root element ('definitions') for exported BPMN XML file. :return: definitions XML element. """ root = eTree.Element(consts.Consts.definitions) root.set("xmlns", "http://www.omg.org/spec/BPMN/20100524/MODEL") root.set(...
Creates root element ('definitions') for exported BPMN XML file. :return: definitions XML element.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L193-L210
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_process_element
def export_process_element(definitions, process_id, process_attributes_dictionary): """ Creates process element for exported BPMN XML file. :param process_id: string object. ID of exported process element, :param definitions: an XML element ('definitions'), root element of BPMN 2.0 docu...
python
def export_process_element(definitions, process_id, process_attributes_dictionary): """ Creates process element for exported BPMN XML file. :param process_id: string object. ID of exported process element, :param definitions: an XML element ('definitions'), root element of BPMN 2.0 docu...
Creates process element for exported BPMN XML file. :param process_id: string object. ID of exported process element, :param definitions: an XML element ('definitions'), root element of BPMN 2.0 document :param process_attributes_dictionary: dictionary that holds attribute values of 'process' e...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L213-L228
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_lane_set
def export_lane_set(process, lane_set, plane_element): """ Creates 'laneSet' element for exported BPMN XML file. :param process: an XML element ('process'), from exported BPMN 2.0 document, :param lane_set: dictionary with exported 'laneSet' element attributes and child elements, ...
python
def export_lane_set(process, lane_set, plane_element): """ Creates 'laneSet' element for exported BPMN XML file. :param process: an XML element ('process'), from exported BPMN 2.0 document, :param lane_set: dictionary with exported 'laneSet' element attributes and child elements, ...
Creates 'laneSet' element for exported BPMN XML file. :param process: an XML element ('process'), from exported BPMN 2.0 document, :param lane_set: dictionary with exported 'laneSet' element attributes and child elements, :param plane_element: XML object, representing 'plane' element of exporte...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L231-L241
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_child_lane_set
def export_child_lane_set(parent_xml_element, child_lane_set, plane_element): """ Creates 'childLaneSet' element for exported BPMN XML file. :param parent_xml_element: an XML element, parent of exported 'childLaneSet' element, :param child_lane_set: dictionary with exported 'childLaneSe...
python
def export_child_lane_set(parent_xml_element, child_lane_set, plane_element): """ Creates 'childLaneSet' element for exported BPMN XML file. :param parent_xml_element: an XML element, parent of exported 'childLaneSet' element, :param child_lane_set: dictionary with exported 'childLaneSe...
Creates 'childLaneSet' element for exported BPMN XML file. :param parent_xml_element: an XML element, parent of exported 'childLaneSet' element, :param child_lane_set: dictionary with exported 'childLaneSet' element attributes and child elements, :param plane_element: XML object, representing '...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L244-L254
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_lane
def export_lane(parent_xml_element, lane_id, lane_attr, plane_element): """ Creates 'lane' element for exported BPMN XML file. :param parent_xml_element: an XML element, parent of exported 'lane' element, :param lane_id: string object. ID of exported lane element, :param lane_at...
python
def export_lane(parent_xml_element, lane_id, lane_attr, plane_element): """ Creates 'lane' element for exported BPMN XML file. :param parent_xml_element: an XML element, parent of exported 'lane' element, :param lane_id: string object. ID of exported lane element, :param lane_at...
Creates 'lane' element for exported BPMN XML file. :param parent_xml_element: an XML element, parent of exported 'lane' element, :param lane_id: string object. ID of exported lane element, :param lane_attr: dictionary with lane element attributes, :param plane_element: XML object, repre...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L257-L287
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_diagram_plane_elements
def export_diagram_plane_elements(root, diagram_attributes, plane_attributes): """ Creates 'diagram' and 'plane' elements for exported BPMN XML file. Returns a tuple (diagram, plane). :param root: object of Element class, representing a BPMN XML root element ('definitions'), :pa...
python
def export_diagram_plane_elements(root, diagram_attributes, plane_attributes): """ Creates 'diagram' and 'plane' elements for exported BPMN XML file. Returns a tuple (diagram, plane). :param root: object of Element class, representing a BPMN XML root element ('definitions'), :pa...
Creates 'diagram' and 'plane' elements for exported BPMN XML file. Returns a tuple (diagram, plane). :param root: object of Element class, representing a BPMN XML root element ('definitions'), :param diagram_attributes: dictionary that holds attribute values for imported 'BPMNDiagram' element, ...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L290-L307
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_node_data
def export_node_data(bpmn_diagram, process_id, params, process): """ Creates a new XML element (depends on node type) for given node parameters and adds it to 'process' element. :param bpmn_diagram: BPMNDiagramGraph class instantion representing a BPMN process diagram, :param process_id...
python
def export_node_data(bpmn_diagram, process_id, params, process): """ Creates a new XML element (depends on node type) for given node parameters and adds it to 'process' element. :param bpmn_diagram: BPMNDiagramGraph class instantion representing a BPMN process diagram, :param process_id...
Creates a new XML element (depends on node type) for given node parameters and adds it to 'process' element. :param bpmn_diagram: BPMNDiagramGraph class instantion representing a BPMN process diagram, :param process_id: string representing ID of given flow node, :param params: dictionary with n...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L310-L355
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_node_di_data
def export_node_di_data(node_id, params, plane): """ Creates a new BPMNShape XML element for given node parameters and adds it to 'plane' element. :param node_id: string representing ID of given flow node, :param params: dictionary with node parameters, :param plane: object of E...
python
def export_node_di_data(node_id, params, plane): """ Creates a new BPMNShape XML element for given node parameters and adds it to 'plane' element. :param node_id: string representing ID of given flow node, :param params: dictionary with node parameters, :param plane: object of E...
Creates a new BPMNShape XML element for given node parameters and adds it to 'plane' element. :param node_id: string representing ID of given flow node, :param params: dictionary with node parameters, :param plane: object of Element class, representing BPMN XML 'BPMNPlane' element (root for nod...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L358-L376
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_flow_process_data
def export_flow_process_data(params, process): """ Creates a new SequenceFlow XML element for given edge parameters and adds it to 'process' element. :param params: dictionary with edge parameters, :param process: object of Element class, representing BPMN XML 'process' element (root fo...
python
def export_flow_process_data(params, process): """ Creates a new SequenceFlow XML element for given edge parameters and adds it to 'process' element. :param params: dictionary with edge parameters, :param process: object of Element class, representing BPMN XML 'process' element (root fo...
Creates a new SequenceFlow XML element for given edge parameters and adds it to 'process' element. :param params: dictionary with edge parameters, :param process: object of Element class, representing BPMN XML 'process' element (root for sequence flows)
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L379-L397
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_flow_di_data
def export_flow_di_data(params, plane): """ Creates a new BPMNEdge XML element for given edge parameters and adds it to 'plane' element. :param params: dictionary with edge parameters, :param plane: object of Element class, representing BPMN XML 'BPMNPlane' element (root for edge DI dat...
python
def export_flow_di_data(params, plane): """ Creates a new BPMNEdge XML element for given edge parameters and adds it to 'plane' element. :param params: dictionary with edge parameters, :param plane: object of Element class, representing BPMN XML 'BPMNPlane' element (root for edge DI dat...
Creates a new BPMNEdge XML element for given edge parameters and adds it to 'plane' element. :param params: dictionary with edge parameters, :param plane: object of Element class, representing BPMN XML 'BPMNPlane' element (root for edge DI data).
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L400-L414
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_xml_file
def export_xml_file(directory, filename, bpmn_diagram): """ Exports diagram inner graph to BPMN 2.0 XML file (with Diagram Interchange data). :param directory: string representing output directory, :param filename: string representing output file name, :param bpmn_diagram: BPMND...
python
def export_xml_file(directory, filename, bpmn_diagram): """ Exports diagram inner graph to BPMN 2.0 XML file (with Diagram Interchange data). :param directory: string representing output directory, :param filename: string representing output file name, :param bpmn_diagram: BPMND...
Exports diagram inner graph to BPMN 2.0 XML file (with Diagram Interchange data). :param directory: string representing output directory, :param filename: string representing output file name, :param bpmn_diagram: BPMNDiagramGraph class instantion representing a BPMN process diagram.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L417-L514
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.export_xml_file_no_di
def export_xml_file_no_di(directory, filename, bpmn_diagram): """ Exports diagram inner graph to BPMN 2.0 XML file (without Diagram Interchange data). :param directory: string representing output directory, :param filename: string representing output file name, :param bpmn_diagr...
python
def export_xml_file_no_di(directory, filename, bpmn_diagram): """ Exports diagram inner graph to BPMN 2.0 XML file (without Diagram Interchange data). :param directory: string representing output directory, :param filename: string representing output file name, :param bpmn_diagr...
Exports diagram inner graph to BPMN 2.0 XML file (without Diagram Interchange data). :param directory: string representing output directory, :param filename: string representing output file name, :param bpmn_diagram: BPMNDiagramGraph class instance representing a BPMN process diagram.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L517-L553
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_export.py
BpmnDiagramGraphExport.indent
def indent(elem, level=0): """ Helper function, adds indentation to XML output. :param elem: object of Element class, representing element to which method adds intendation, :param level: current level of intendation. """ i = "\n" + level * " " j = "\n" + (level ...
python
def indent(elem, level=0): """ Helper function, adds indentation to XML output. :param elem: object of Element class, representing element to which method adds intendation, :param level: current level of intendation. """ i = "\n" + level * " " j = "\n" + (level ...
Helper function, adds indentation to XML output. :param elem: object of Element class, representing element to which method adds intendation, :param level: current level of intendation.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_export.py#L557-L578
KrzyHonk/bpmn-python
bpmn_python/graph/classes/events/throw_event_type.py
ThrowEvent.set_event_definition_list
def set_event_definition_list(self, value): """ Setter for 'event_definition_list' field. :param value - a new value of 'event_definition_list' field. Must be a list of EventDefinition objects """ if value is None or not isinstance(value, list): raise TypeError("Event...
python
def set_event_definition_list(self, value): """ Setter for 'event_definition_list' field. :param value - a new value of 'event_definition_list' field. Must be a list of EventDefinition objects """ if value is None or not isinstance(value, list): raise TypeError("Event...
Setter for 'event_definition_list' field. :param value - a new value of 'event_definition_list' field. Must be a list of EventDefinition objects
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/events/throw_event_type.py#L30-L41
KrzyHonk/bpmn-python
bpmn_python/bpmn_import_utils.py
BpmnImportUtils.iterate_elements
def iterate_elements(parent): """ Helper function that iterates over child Nodes/Elements of parent Node/Element. :param parent: object of Element class, representing parent element. """ element = parent.firstChild while element is not None: yield element ...
python
def iterate_elements(parent): """ Helper function that iterates over child Nodes/Elements of parent Node/Element. :param parent: object of Element class, representing parent element. """ element = parent.firstChild while element is not None: yield element ...
Helper function that iterates over child Nodes/Elements of parent Node/Element. :param parent: object of Element class, representing parent element.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_import_utils.py#L27-L36
KrzyHonk/bpmn-python
bpmn_python/bpmn_import_utils.py
BpmnImportUtils.generate_nodes_clasification
def generate_nodes_clasification(bpmn_diagram): """ Diagram elements classification. Implementation based on article "A Simple Algorithm for Automatic Layout of BPMN Processes". Assigns a classification to the diagram element according to specific element parameters. - Element - ...
python
def generate_nodes_clasification(bpmn_diagram): """ Diagram elements classification. Implementation based on article "A Simple Algorithm for Automatic Layout of BPMN Processes". Assigns a classification to the diagram element according to specific element parameters. - Element - ...
Diagram elements classification. Implementation based on article "A Simple Algorithm for Automatic Layout of BPMN Processes". Assigns a classification to the diagram element according to specific element parameters. - Element - every element of the process which is not an edge, - Start E...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_import_utils.py#L39-L114
KrzyHonk/bpmn-python
bpmn_python/bpmn_import_utils.py
BpmnImportUtils.split_join_classification
def split_join_classification(element, classification_labels, nodes_classification): """ Add the "Split", "Join" classification, if the element qualifies for. :param element: an element from BPMN diagram, :param classification_labels: list of labels attached to the element, :par...
python
def split_join_classification(element, classification_labels, nodes_classification): """ Add the "Split", "Join" classification, if the element qualifies for. :param element: an element from BPMN diagram, :param classification_labels: list of labels attached to the element, :par...
Add the "Split", "Join" classification, if the element qualifies for. :param element: an element from BPMN diagram, :param classification_labels: list of labels attached to the element, :param nodes_classification: dictionary of classification labels. Key - node id. Value - a list of labels.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_import_utils.py#L117-L131
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_metrics.py
get_all_gateways
def get_all_gateways(bpmn_graph): """ Returns a list with all gateways in diagram :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. :return: a list with all gateways in diagram """ gateways = filter(lambda node: node[1]['type'] in GATEWAY_TYPES, bpmn_graph.get_nodes())...
python
def get_all_gateways(bpmn_graph): """ Returns a list with all gateways in diagram :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. :return: a list with all gateways in diagram """ gateways = filter(lambda node: node[1]['type'] in GATEWAY_TYPES, bpmn_graph.get_nodes())...
Returns a list with all gateways in diagram :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. :return: a list with all gateways in diagram
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_metrics.py#L29-L38
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_metrics.py
all_control_flow_elements_count
def all_control_flow_elements_count(bpmn_graph): """ Returns the total count of all control flow elements in the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. :return: total count of the control flow elements in the BPMNDiagramGraph inst...
python
def all_control_flow_elements_count(bpmn_graph): """ Returns the total count of all control flow elements in the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. :return: total count of the control flow elements in the BPMNDiagramGraph inst...
Returns the total count of all control flow elements in the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. :return: total count of the control flow elements in the BPMNDiagramGraph instance
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_metrics.py#L111-L128
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_metrics.py
TNE_metric
def TNE_metric(bpmn_graph): """ Returns the value of the TNE metric (Total Number of Events of the Model) for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. """ events_counts = get_events_counts(bpmn_graph) return sum( [c...
python
def TNE_metric(bpmn_graph): """ Returns the value of the TNE metric (Total Number of Events of the Model) for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. """ events_counts = get_events_counts(bpmn_graph) return sum( [c...
Returns the value of the TNE metric (Total Number of Events of the Model) for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_metrics.py#L179-L191
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_metrics.py
NOAC_metric
def NOAC_metric(bpmn_graph): """ Returns the value of the NOAC metric (Number of Activities and control flow elements) for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. """ activities_count = all_activities_count(bpmn_graph) cont...
python
def NOAC_metric(bpmn_graph): """ Returns the value of the NOAC metric (Number of Activities and control flow elements) for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. """ activities_count = all_activities_count(bpmn_graph) cont...
Returns the value of the NOAC metric (Number of Activities and control flow elements) for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_metrics.py#L207-L218
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_metrics.py
NOAJS_metric
def NOAJS_metric(bpmn_graph): """ Returns the value of the NOAJS metric (Number of Activities, joins and splits) for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. """ activities_count = all_activities_count(bpmn_graph) gateways_c...
python
def NOAJS_metric(bpmn_graph): """ Returns the value of the NOAJS metric (Number of Activities, joins and splits) for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. """ activities_count = all_activities_count(bpmn_graph) gateways_c...
Returns the value of the NOAJS metric (Number of Activities, joins and splits) for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_metrics.py#L221-L232
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_metrics.py
NumberOfNodes_metric
def NumberOfNodes_metric(bpmn_graph): """ Returns the value of the Number of Nodes metric ("Number of activities and routing elements in a model") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. """ activities_count = all_activ...
python
def NumberOfNodes_metric(bpmn_graph): """ Returns the value of the Number of Nodes metric ("Number of activities and routing elements in a model") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. """ activities_count = all_activ...
Returns the value of the Number of Nodes metric ("Number of activities and routing elements in a model") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_metrics.py#L235-L247
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_metrics.py
GatewayHeterogenity_metric
def GatewayHeterogenity_metric(bpmn_graph): """ Returns the value of the Gateway Heterogenity metric ("Number of different types of gateways used in a mode") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. """ gateway_counts = ...
python
def GatewayHeterogenity_metric(bpmn_graph): """ Returns the value of the Gateway Heterogenity metric ("Number of different types of gateways used in a mode") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model. """ gateway_counts = ...
Returns the value of the Gateway Heterogenity metric ("Number of different types of gateways used in a mode") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_metrics.py#L250-L264
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_metrics.py
CoefficientOfNetworkComplexity_metric
def CoefficientOfNetworkComplexity_metric(bpmn_graph): """ Returns the value of the Coefficient of Network Complexity metric ("Ratio of the total number of arcs in a process model to its total number of nodes.") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph r...
python
def CoefficientOfNetworkComplexity_metric(bpmn_graph): """ Returns the value of the Coefficient of Network Complexity metric ("Ratio of the total number of arcs in a process model to its total number of nodes.") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph r...
Returns the value of the Coefficient of Network Complexity metric ("Ratio of the total number of arcs in a process model to its total number of nodes.") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_metrics.py#L267-L276
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_metrics.py
AverageGatewayDegree_metric
def AverageGatewayDegree_metric(bpmn_graph): """ Returns the value of the Average Gateway Degree metric ("Average of the number of both incoming and outgoing arcs of the gateway nodes in the process model") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph repres...
python
def AverageGatewayDegree_metric(bpmn_graph): """ Returns the value of the Average Gateway Degree metric ("Average of the number of both incoming and outgoing arcs of the gateway nodes in the process model") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph repres...
Returns the value of the Average Gateway Degree metric ("Average of the number of both incoming and outgoing arcs of the gateway nodes in the process model") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of BpmnDiagramGraph representing BPMN model.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_metrics.py#L279-L292
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_metrics.py
DurfeeSquare_metric
def DurfeeSquare_metric(bpmn_graph): """ Returns the value of the Durfee Square metric ("Durfee Square equals d if there are d types of elements which occur at least d times in the model (each), and the other types of elements occur no more than d times (each)") for the BPMNDiagramGraph inst...
python
def DurfeeSquare_metric(bpmn_graph): """ Returns the value of the Durfee Square metric ("Durfee Square equals d if there are d types of elements which occur at least d times in the model (each), and the other types of elements occur no more than d times (each)") for the BPMNDiagramGraph inst...
Returns the value of the Durfee Square metric ("Durfee Square equals d if there are d types of elements which occur at least d times in the model (each), and the other types of elements occur no more than d times (each)") for the BPMNDiagramGraph instance. :param bpmn_graph: an instance of Bpmn...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_metrics.py#L295-L319
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_metrics.py
PerfectSquare_metric
def PerfectSquare_metric(bpmn_graph): """ Returns the value of the Perfect Square metric ("Given a set of element types ranked in decreasing order of the number of their instances, the PSM is the (unique) largest number such that the top p types occur(together) at least p2 times.") for t...
python
def PerfectSquare_metric(bpmn_graph): """ Returns the value of the Perfect Square metric ("Given a set of element types ranked in decreasing order of the number of their instances, the PSM is the (unique) largest number such that the top p types occur(together) at least p2 times.") for t...
Returns the value of the Perfect Square metric ("Given a set of element types ranked in decreasing order of the number of their instances, the PSM is the (unique) largest number such that the top p types occur(together) at least p2 times.") for the BPMNDiagramGraph instance. :param bpmn_gra...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_metrics.py#L322-L346
KrzyHonk/bpmn-python
bpmn_python/bpmn_process_csv_export.py
BpmnDiagramGraphCsvExport.export_process_to_csv
def export_process_to_csv(bpmn_diagram, directory, filename): """ Root method of CSV export functionality. :param bpmn_diagram: an instance of BpmnDiagramGraph class, :param directory: a string object, which is a path of output directory, :param filename: a string object, which ...
python
def export_process_to_csv(bpmn_diagram, directory, filename): """ Root method of CSV export functionality. :param bpmn_diagram: an instance of BpmnDiagramGraph class, :param directory: a string object, which is a path of output directory, :param filename: a string object, which ...
Root method of CSV export functionality. :param bpmn_diagram: an instance of BpmnDiagramGraph class, :param directory: a string object, which is a path of output directory, :param filename: a string object, which is a name of output file.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_process_csv_export.py#L44-L75
KrzyHonk/bpmn-python
bpmn_python/bpmn_process_csv_export.py
BpmnDiagramGraphCsvExport.export_node
def export_node(bpmn_graph, export_elements, node, nodes_classification, order=0, prefix="", condition="", who="", add_join=False): """ General method for node exporting :param bpmn_graph: an instance of BpmnDiagramGraph class, :param export_elements: a dictionary ob...
python
def export_node(bpmn_graph, export_elements, node, nodes_classification, order=0, prefix="", condition="", who="", add_join=False): """ General method for node exporting :param bpmn_graph: an instance of BpmnDiagramGraph class, :param export_elements: a dictionary ob...
General method for node exporting :param bpmn_graph: an instance of BpmnDiagramGraph class, :param export_elements: a dictionary object. The key is a node ID, value is a dictionary of parameters that will be used in exported CSV document, :param node: networkx.Node object, ...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_process_csv_export.py#L78-L107
KrzyHonk/bpmn-python
bpmn_python/bpmn_process_csv_export.py
BpmnDiagramGraphCsvExport.export_element
def export_element(bpmn_graph, export_elements, node, nodes_classification, order=0, prefix="", condition="", who="", add_join=False): """ Export a node with "Element" classification (task, subprocess or gateway) :param bpmn_graph: an instance of BpmnDiagramGraph class, ...
python
def export_element(bpmn_graph, export_elements, node, nodes_classification, order=0, prefix="", condition="", who="", add_join=False): """ Export a node with "Element" classification (task, subprocess or gateway) :param bpmn_graph: an instance of BpmnDiagramGraph class, ...
Export a node with "Element" classification (task, subprocess or gateway) :param bpmn_graph: an instance of BpmnDiagramGraph class, :param export_elements: a dictionary object. The key is a node ID, value is a dictionary of parameters that will be used in exported CSV document, :...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_process_csv_export.py#L110-L205
KrzyHonk/bpmn-python
bpmn_python/bpmn_process_csv_export.py
BpmnDiagramGraphCsvExport.export_start_event
def export_start_event(bpmn_graph, export_elements, node, nodes_classification, order=0, prefix="", condition="", who=""): """ Start event export :param bpmn_graph: an instance of BpmnDiagramGraph class, :param export_elements: a dictionary object. The key is ...
python
def export_start_event(bpmn_graph, export_elements, node, nodes_classification, order=0, prefix="", condition="", who=""): """ Start event export :param bpmn_graph: an instance of BpmnDiagramGraph class, :param export_elements: a dictionary object. The key is ...
Start event export :param bpmn_graph: an instance of BpmnDiagramGraph class, :param export_elements: a dictionary object. The key is a node ID, value is a dictionary of parameters that will be used in exported CSV document, :param node: networkx.Node object, :param order:...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_process_csv_export.py#L208-L249
KrzyHonk/bpmn-python
bpmn_python/bpmn_process_csv_export.py
BpmnDiagramGraphCsvExport.export_end_event
def export_end_event(export_elements, node, order=0, prefix="", condition="", who=""): """ End event export :param export_elements: a dictionary object. The key is a node ID, value is a dictionary of parameters that will be used in exported CSV document, :param node: netw...
python
def export_end_event(export_elements, node, order=0, prefix="", condition="", who=""): """ End event export :param export_elements: a dictionary object. The key is a node ID, value is a dictionary of parameters that will be used in exported CSV document, :param node: netw...
End event export :param export_elements: a dictionary object. The key is a node ID, value is a dictionary of parameters that will be used in exported CSV document, :param node: networkx.Node object, :param order: the order param of exported node, :param prefix: the prefix...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_process_csv_export.py#L252-L284
KrzyHonk/bpmn-python
bpmn_python/bpmn_process_csv_export.py
BpmnDiagramGraphCsvExport.write_export_node_to_file
def write_export_node_to_file(file_object, export_elements): """ Exporting process to CSV file :param file_object: object of File class, :param export_elements: a dictionary object. The key is a node ID, value is a dictionary of parameters that will be used in exported CS...
python
def write_export_node_to_file(file_object, export_elements): """ Exporting process to CSV file :param file_object: object of File class, :param export_elements: a dictionary object. The key is a node ID, value is a dictionary of parameters that will be used in exported CS...
Exporting process to CSV file :param file_object: object of File class, :param export_elements: a dictionary object. The key is a node ID, value is a dictionary of parameters that will be used in exported CSV document.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_process_csv_export.py#L287-L299
KrzyHonk/bpmn-python
bpmn_python/graph/classes/events/catch_event_type.py
CatchEvent.set_parallel_multiple
def set_parallel_multiple(self, value): """ Setter for 'parallel_multiple' field. :param value - a new value of 'parallel_multiple' field. Must be a boolean type. Does not accept None value. """ if value is None or not isinstance(value, bool): raise TypeError("Paralle...
python
def set_parallel_multiple(self, value): """ Setter for 'parallel_multiple' field. :param value - a new value of 'parallel_multiple' field. Must be a boolean type. Does not accept None value. """ if value is None or not isinstance(value, bool): raise TypeError("Paralle...
Setter for 'parallel_multiple' field. :param value - a new value of 'parallel_multiple' field. Must be a boolean type. Does not accept None value.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/events/catch_event_type.py#L32-L40
KrzyHonk/bpmn-python
bpmn_python/graph/classes/activities/subprocess_type.py
SubProcess.set_triggered_by_event
def set_triggered_by_event(self, value): """ Setter for 'triggered_by_event' field. :param value - a new value of 'triggered_by_event' field. Must be a boolean type. Does not accept None value. """ if value is None or not isinstance(value, bool): raise TypeError("Trig...
python
def set_triggered_by_event(self, value): """ Setter for 'triggered_by_event' field. :param value - a new value of 'triggered_by_event' field. Must be a boolean type. Does not accept None value. """ if value is None or not isinstance(value, bool): raise TypeError("Trig...
Setter for 'triggered_by_event' field. :param value - a new value of 'triggered_by_event' field. Must be a boolean type. Does not accept None value.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/activities/subprocess_type.py#L35-L43
KrzyHonk/bpmn-python
bpmn_python/graph/classes/activities/subprocess_type.py
SubProcess.set_lane_set_list
def set_lane_set_list(self, value): """ Setter for 'lane_set_list' field. :param value - a new value of 'lane_set_list' field. Must be a list """ if value is None or not isinstance(value, list): raise TypeError("LaneSetList new value must be a list") else: ...
python
def set_lane_set_list(self, value): """ Setter for 'lane_set_list' field. :param value - a new value of 'lane_set_list' field. Must be a list """ if value is None or not isinstance(value, list): raise TypeError("LaneSetList new value must be a list") else: ...
Setter for 'lane_set_list' field. :param value - a new value of 'lane_set_list' field. Must be a list
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/activities/subprocess_type.py#L52-L63
KrzyHonk/bpmn-python
bpmn_python/graph/classes/activities/subprocess_type.py
SubProcess.set_flow_element_list
def set_flow_element_list(self, value): """ Setter for 'flow_element_list' field. :param value - a new value of 'flow_element_list' field. Must be a list """ if value is None or not isinstance(value, list): raise TypeError("FlowElementList new value must be a list") ...
python
def set_flow_element_list(self, value): """ Setter for 'flow_element_list' field. :param value - a new value of 'flow_element_list' field. Must be a list """ if value is None or not isinstance(value, list): raise TypeError("FlowElementList new value must be a list") ...
Setter for 'flow_element_list' field. :param value - a new value of 'flow_element_list' field. Must be a list
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/activities/subprocess_type.py#L72-L83
KrzyHonk/bpmn-python
bpmn_python/graph/classes/flow_node_type.py
FlowNode.set_incoming
def set_incoming(self, value): """ Setter for 'incoming' field. :param value - a new value of 'incoming' field. List of IDs (String type) of incoming flows. """ if not isinstance(value, list): raise TypeError("IncomingList new value must be a list") for elemen...
python
def set_incoming(self, value): """ Setter for 'incoming' field. :param value - a new value of 'incoming' field. List of IDs (String type) of incoming flows. """ if not isinstance(value, list): raise TypeError("IncomingList new value must be a list") for elemen...
Setter for 'incoming' field. :param value - a new value of 'incoming' field. List of IDs (String type) of incoming flows.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/flow_node_type.py#L31-L41
KrzyHonk/bpmn-python
bpmn_python/graph/classes/flow_node_type.py
FlowNode.set_outgoing
def set_outgoing(self, value): """ Setter for 'outgoing' field. :param value - a new value of 'outgoing' field. Must be a list of IDs (String type) of outgoing flows. """ if not isinstance(value, list): raise TypeError("OutgoingList new value must be a list") ...
python
def set_outgoing(self, value): """ Setter for 'outgoing' field. :param value - a new value of 'outgoing' field. Must be a list of IDs (String type) of outgoing flows. """ if not isinstance(value, list): raise TypeError("OutgoingList new value must be a list") ...
Setter for 'outgoing' field. :param value - a new value of 'outgoing' field. Must be a list of IDs (String type) of outgoing flows.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/flow_node_type.py#L50-L60
KrzyHonk/bpmn-python
bpmn_python/graph/classes/root_element/process_type.py
Process.set_process_type
def set_process_type(self, value): """ Setter for 'process_type' field. :param value - a new value of 'process_type' field. """ if value is None or not isinstance(value, str): raise TypeError("ProcessType must be set to a String") elif value not in Process.__p...
python
def set_process_type(self, value): """ Setter for 'process_type' field. :param value - a new value of 'process_type' field. """ if value is None or not isinstance(value, str): raise TypeError("ProcessType must be set to a String") elif value not in Process.__p...
Setter for 'process_type' field. :param value - a new value of 'process_type' field.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/root_element/process_type.py#L34-L44
KrzyHonk/bpmn-python
bpmn_python/graph/classes/root_element/process_type.py
Process.set_is_closed
def set_is_closed(self, value): """ Setter for 'is_closed' field. :param value - a new value of 'is_closed' field. Must be a boolean type. Does not accept None value. """ if value is None or not isinstance(value, bool): raise TypeError("IsClosed must be set to a bool"...
python
def set_is_closed(self, value): """ Setter for 'is_closed' field. :param value - a new value of 'is_closed' field. Must be a boolean type. Does not accept None value. """ if value is None or not isinstance(value, bool): raise TypeError("IsClosed must be set to a bool"...
Setter for 'is_closed' field. :param value - a new value of 'is_closed' field. Must be a boolean type. Does not accept None value.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/root_element/process_type.py#L53-L61
KrzyHonk/bpmn-python
bpmn_python/graph/classes/root_element/process_type.py
Process.set_is_executable
def set_is_executable(self, value): """ Setter for 'is_executable' field. :param value - a new value of 'is_executable' field. Must be a boolean type. Does not accept None value. """ if value is None or not isinstance(value, bool): raise TypeError("IsExecutable must b...
python
def set_is_executable(self, value): """ Setter for 'is_executable' field. :param value - a new value of 'is_executable' field. Must be a boolean type. Does not accept None value. """ if value is None or not isinstance(value, bool): raise TypeError("IsExecutable must b...
Setter for 'is_executable' field. :param value - a new value of 'is_executable' field. Must be a boolean type. Does not accept None value.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/root_element/process_type.py#L70-L78
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_visualizer.py
visualize_diagram
def visualize_diagram(bpmn_diagram): """ Shows a simple visualization of diagram :param bpmn_diagram: an instance of BPMNDiagramGraph class. """ g = bpmn_diagram.diagram_graph pos = bpmn_diagram.get_nodes_positions() nx.draw_networkx_nodes(g, pos, node_shape='s', node_color='white', ...
python
def visualize_diagram(bpmn_diagram): """ Shows a simple visualization of diagram :param bpmn_diagram: an instance of BPMNDiagramGraph class. """ g = bpmn_diagram.diagram_graph pos = bpmn_diagram.get_nodes_positions() nx.draw_networkx_nodes(g, pos, node_shape='s', node_color='white', ...
Shows a simple visualization of diagram :param bpmn_diagram: an instance of BPMNDiagramGraph class.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_visualizer.py#L13-L56
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_visualizer.py
bpmn_diagram_to_png
def bpmn_diagram_to_png(bpmn_diagram, file_name): """ Create a png picture for given diagram :param bpmn_diagram: an instance of BPMNDiagramGraph class, :param file_name: name of generated file. """ g = bpmn_diagram.diagram_graph graph = pydotplus.Dot() for node in g.nodes(data=True): ...
python
def bpmn_diagram_to_png(bpmn_diagram, file_name): """ Create a png picture for given diagram :param bpmn_diagram: an instance of BPMNDiagramGraph class, :param file_name: name of generated file. """ g = bpmn_diagram.diagram_graph graph = pydotplus.Dot() for node in g.nodes(data=True): ...
Create a png picture for given diagram :param bpmn_diagram: an instance of BPMNDiagramGraph class, :param file_name: name of generated file.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_visualizer.py#L70-L94
KrzyHonk/bpmn-python
bpmn_python/graph/classes/base_element_type.py
BaseElement.set_id
def set_id(self, value): """ Setter for 'id' field. :param value - a new value of 'id' field. Must be either None (ID is optional according to BPMN 2.0 XML Schema) or String type. """ if value is None: self.__id = value if not isinstance(value, str): ...
python
def set_id(self, value): """ Setter for 'id' field. :param value - a new value of 'id' field. Must be either None (ID is optional according to BPMN 2.0 XML Schema) or String type. """ if value is None: self.__id = value if not isinstance(value, str): ...
Setter for 'id' field. :param value - a new value of 'id' field. Must be either None (ID is optional according to BPMN 2.0 XML Schema) or String type.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/base_element_type.py#L27-L38
KrzyHonk/bpmn-python
bpmn_python/graph/classes/sequence_flow_type.py
SequenceFlow.set_source_ref
def set_source_ref(self, value): """ Setter for 'source_ref' field. :param value - a new value of 'source_ref' field. Required field. Must be a String type. """ if value is None or not isinstance(value, str): raise TypeError("SourceRef is required and must be set to a...
python
def set_source_ref(self, value): """ Setter for 'source_ref' field. :param value - a new value of 'source_ref' field. Required field. Must be a String type. """ if value is None or not isinstance(value, str): raise TypeError("SourceRef is required and must be set to a...
Setter for 'source_ref' field. :param value - a new value of 'source_ref' field. Required field. Must be a String type.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/sequence_flow_type.py#L42-L50
KrzyHonk/bpmn-python
bpmn_python/graph/classes/sequence_flow_type.py
SequenceFlow.set_target_ref
def set_target_ref(self, value): """ Setter for 'target_ref' field. :param value - a new value of 'target_ref' field. Required field. Must be a String type. """ if value is None or not isinstance(value, str): raise TypeError("TargetRef is required and must be set to a...
python
def set_target_ref(self, value): """ Setter for 'target_ref' field. :param value - a new value of 'target_ref' field. Required field. Must be a String type. """ if value is None or not isinstance(value, str): raise TypeError("TargetRef is required and must be set to a...
Setter for 'target_ref' field. :param value - a new value of 'target_ref' field. Required field. Must be a String type.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/sequence_flow_type.py#L59-L67
KrzyHonk/bpmn-python
bpmn_python/graph/classes/sequence_flow_type.py
SequenceFlow.set_is_immediate
def set_is_immediate(self, value): """ Setter for 'is_immediate' field. :param value - a new value of 'is_immediate' field. Must be a boolean type. """ if value is None: self.__is_immediate = value elif not isinstance(value, bool): raise TypeError(...
python
def set_is_immediate(self, value): """ Setter for 'is_immediate' field. :param value - a new value of 'is_immediate' field. Must be a boolean type. """ if value is None: self.__is_immediate = value elif not isinstance(value, bool): raise TypeError(...
Setter for 'is_immediate' field. :param value - a new value of 'is_immediate' field. Must be a boolean type.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/sequence_flow_type.py#L76-L86
KrzyHonk/bpmn-python
bpmn_python/graph/classes/sequence_flow_type.py
SequenceFlow.set_condition_expression
def set_condition_expression(self, value): """ Setter for 'condition_expression' field. :param value - a new value of 'condition_expression' field. """ if value is None: self.__condition_expression = value if not isinstance(value, condition_expression.Conditio...
python
def set_condition_expression(self, value): """ Setter for 'condition_expression' field. :param value - a new value of 'condition_expression' field. """ if value is None: self.__condition_expression = value if not isinstance(value, condition_expression.Conditio...
Setter for 'condition_expression' field. :param value - a new value of 'condition_expression' field.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/sequence_flow_type.py#L96-L106
KrzyHonk/bpmn-python
bpmn_python/graph/classes/gateways/exclusive_gateway_type.py
ExclusiveGateway.set_default
def set_default(self, value): """ Setter for 'default' field. :param value - a new value of 'default' field. Must be either None (default is optional according to BPMN 2.0 XML Schema) or String. """ if value is None: self.__default = value elif not isi...
python
def set_default(self, value): """ Setter for 'default' field. :param value - a new value of 'default' field. Must be either None (default is optional according to BPMN 2.0 XML Schema) or String. """ if value is None: self.__default = value elif not isi...
Setter for 'default' field. :param value - a new value of 'default' field. Must be either None (default is optional according to BPMN 2.0 XML Schema) or String.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/gateways/exclusive_gateway_type.py#L30-L41
KrzyHonk/bpmn-python
bpmn_python/diagram_layout_metrics.py
orientation
def orientation(p1, p2, p3): """ Finds orientation of three points p1, p2, p3. The function returns following values 0 --> p1, p2 and p3 are collinear 1 --> Clockwise 2 --> Counterclockwise :param p1: tuple representing two dimensional point :param p2: tuple representing two dimensional ...
python
def orientation(p1, p2, p3): """ Finds orientation of three points p1, p2, p3. The function returns following values 0 --> p1, p2 and p3 are collinear 1 --> Clockwise 2 --> Counterclockwise :param p1: tuple representing two dimensional point :param p2: tuple representing two dimensional ...
Finds orientation of three points p1, p2, p3. The function returns following values 0 --> p1, p2 and p3 are collinear 1 --> Clockwise 2 --> Counterclockwise :param p1: tuple representing two dimensional point :param p2: tuple representing two dimensional point :param p3: tuple representing t...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/diagram_layout_metrics.py#L130-L149
KrzyHonk/bpmn-python
bpmn_python/graph/classes/participant_type.py
Participant.set_process_ref
def set_process_ref(self, value): """ Setter for 'process_ref' field. :param value - a new value of 'process_ref' field. Must be either None (process_ref is optional according to BPMN 2.0 XML Schema) or String. """ if not isinstance(value, str): raise TypeErro...
python
def set_process_ref(self, value): """ Setter for 'process_ref' field. :param value - a new value of 'process_ref' field. Must be either None (process_ref is optional according to BPMN 2.0 XML Schema) or String. """ if not isinstance(value, str): raise TypeErro...
Setter for 'process_ref' field. :param value - a new value of 'process_ref' field. Must be either None (process_ref is optional according to BPMN 2.0 XML Schema) or String.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/participant_type.py#L52-L60
KrzyHonk/bpmn-python
bpmn_python/graph/classes/message_flow_type.py
MessageFlow.set_message_ref
def set_message_ref(self, value): """ Setter for 'message_ref' field. :param value - a new value of 'message_ref' field. Must be either None (message_ref is optional according to BPMN 2.0 XML Schema) or String. """ if value is None: self.__message_ref = value ...
python
def set_message_ref(self, value): """ Setter for 'message_ref' field. :param value - a new value of 'message_ref' field. Must be either None (message_ref is optional according to BPMN 2.0 XML Schema) or String. """ if value is None: self.__message_ref = value ...
Setter for 'message_ref' field. :param value - a new value of 'message_ref' field. Must be either None (message_ref is optional according to BPMN 2.0 XML Schema) or String.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/message_flow_type.py#L95-L106
KrzyHonk/bpmn-python
bpmn_python/graph/classes/lane_type.py
Lane.set_flow_node_ref_list
def set_flow_node_ref_list(self, value): """ Setter for 'flow_node_ref' field. :param value - a new value of 'flow_node_ref' field. Must be a list of String objects (ID of referenced nodes). """ if value is None or not isinstance(value, list): raise TypeError("FlowNod...
python
def set_flow_node_ref_list(self, value): """ Setter for 'flow_node_ref' field. :param value - a new value of 'flow_node_ref' field. Must be a list of String objects (ID of referenced nodes). """ if value is None or not isinstance(value, list): raise TypeError("FlowNod...
Setter for 'flow_node_ref' field. :param value - a new value of 'flow_node_ref' field. Must be a list of String objects (ID of referenced nodes).
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/lane_type.py#L54-L65
KrzyHonk/bpmn-python
bpmn_python/graph/classes/lane_type.py
Lane.set_child_lane_set
def set_child_lane_set(self, value): """ Setter for 'child_lane_set' field. :param value - a new value of 'child_lane_set' field. Must be an object of LaneSet type. """ if value is None: self.__child_lane_set = value elif not isinstance(value, lane_set.LaneSet...
python
def set_child_lane_set(self, value): """ Setter for 'child_lane_set' field. :param value - a new value of 'child_lane_set' field. Must be an object of LaneSet type. """ if value is None: self.__child_lane_set = value elif not isinstance(value, lane_set.LaneSet...
Setter for 'child_lane_set' field. :param value - a new value of 'child_lane_set' field. Must be an object of LaneSet type.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/lane_type.py#L74-L84
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.export_xml_file
def export_xml_file(self, directory, filename): """ Exports diagram inner graph to BPMN 2.0 XML file (with Diagram Interchange data). :param directory: strings representing output directory, :param filename: string representing output file name. """ bpmn_export.BpmnDiagr...
python
def export_xml_file(self, directory, filename): """ Exports diagram inner graph to BPMN 2.0 XML file (with Diagram Interchange data). :param directory: strings representing output directory, :param filename: string representing output file name. """ bpmn_export.BpmnDiagr...
Exports diagram inner graph to BPMN 2.0 XML file (with Diagram Interchange data). :param directory: strings representing output directory, :param filename: string representing output file name.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L67-L74
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.export_xml_file_no_di
def export_xml_file_no_di(self, directory, filename): """ Exports diagram inner graph to BPMN 2.0 XML file (without Diagram Interchange data). :param directory: strings representing output directory, :param filename: string representing output file name. """ bpmn_export....
python
def export_xml_file_no_di(self, directory, filename): """ Exports diagram inner graph to BPMN 2.0 XML file (without Diagram Interchange data). :param directory: strings representing output directory, :param filename: string representing output file name. """ bpmn_export....
Exports diagram inner graph to BPMN 2.0 XML file (without Diagram Interchange data). :param directory: strings representing output directory, :param filename: string representing output file name.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L76-L83
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.export_csv_file
def export_csv_file(self, directory, filename): """ Exports diagram inner graph to BPMN 2.0 XML file (with Diagram Interchange data). :param directory: strings representing output directory, :param filename: string representing output file name. """ bpmn_csv_export.BpmnD...
python
def export_csv_file(self, directory, filename): """ Exports diagram inner graph to BPMN 2.0 XML file (with Diagram Interchange data). :param directory: strings representing output directory, :param filename: string representing output file name. """ bpmn_csv_export.BpmnD...
Exports diagram inner graph to BPMN 2.0 XML file (with Diagram Interchange data). :param directory: strings representing output directory, :param filename: string representing output file name.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L95-L102
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.get_nodes
def get_nodes(self, node_type=""): """ Gets all nodes of requested type. If no type is provided by user, all nodes in BPMN diagram graph are returned. Returns a dictionary, where key is an ID of node, value is a dictionary of all node attributes. :param node_type: string with valid BPMN...
python
def get_nodes(self, node_type=""): """ Gets all nodes of requested type. If no type is provided by user, all nodes in BPMN diagram graph are returned. Returns a dictionary, where key is an ID of node, value is a dictionary of all node attributes. :param node_type: string with valid BPMN...
Gets all nodes of requested type. If no type is provided by user, all nodes in BPMN diagram graph are returned. Returns a dictionary, where key is an ID of node, value is a dictionary of all node attributes. :param node_type: string with valid BPMN XML tag name (e.g. 'task', 'sequenceFlow').
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L105-L120
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.get_nodes_list_by_process_id
def get_nodes_list_by_process_id(self, process_id): """ Gets all nodes of requested type. If no type is provided by user, all nodes in BPMN diagram graph are returned. Returns a dictionary, where key is an ID of node, value is a dictionary of all node attributes. :param process_id: stri...
python
def get_nodes_list_by_process_id(self, process_id): """ Gets all nodes of requested type. If no type is provided by user, all nodes in BPMN diagram graph are returned. Returns a dictionary, where key is an ID of node, value is a dictionary of all node attributes. :param process_id: stri...
Gets all nodes of requested type. If no type is provided by user, all nodes in BPMN diagram graph are returned. Returns a dictionary, where key is an ID of node, value is a dictionary of all node attributes. :param process_id: string object, representing an ID of parent process element.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L122-L134
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.get_node_by_id
def get_node_by_id(self, node_id): """ Gets a node with requested ID. Returns a tuple, where first value is node ID, second - a dictionary of all node attributes. :param node_id: string with ID of node. """ tmp_nodes = self.diagram_graph.nodes(data=True) for node...
python
def get_node_by_id(self, node_id): """ Gets a node with requested ID. Returns a tuple, where first value is node ID, second - a dictionary of all node attributes. :param node_id: string with ID of node. """ tmp_nodes = self.diagram_graph.nodes(data=True) for node...
Gets a node with requested ID. Returns a tuple, where first value is node ID, second - a dictionary of all node attributes. :param node_id: string with ID of node.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L136-L146
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.get_nodes_id_list_by_type
def get_nodes_id_list_by_type(self, node_type): """ Get a list of node's id by requested type. Returns a list of ids :param node_type: string with valid BPMN XML tag name (e.g. 'task', 'sequenceFlow'). """ tmp_nodes = self.diagram_graph.nodes(data=True) id_list =...
python
def get_nodes_id_list_by_type(self, node_type): """ Get a list of node's id by requested type. Returns a list of ids :param node_type: string with valid BPMN XML tag name (e.g. 'task', 'sequenceFlow'). """ tmp_nodes = self.diagram_graph.nodes(data=True) id_list =...
Get a list of node's id by requested type. Returns a list of ids :param node_type: string with valid BPMN XML tag name (e.g. 'task', 'sequenceFlow').
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L148-L160
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.get_flow_by_id
def get_flow_by_id(self, flow_id): """ Gets an edge (flow) with requested ID. Returns a tuple, where first value is node ID, second - a dictionary of all node attributes. :param flow_id: string with edge ID. """ tmp_flows = self.diagram_graph.edges(data=True) for...
python
def get_flow_by_id(self, flow_id): """ Gets an edge (flow) with requested ID. Returns a tuple, where first value is node ID, second - a dictionary of all node attributes. :param flow_id: string with edge ID. """ tmp_flows = self.diagram_graph.edges(data=True) for...
Gets an edge (flow) with requested ID. Returns a tuple, where first value is node ID, second - a dictionary of all node attributes. :param flow_id: string with edge ID.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L170-L180
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.get_flows_list_by_process_id
def get_flows_list_by_process_id(self, process_id): """ Gets an edge (flow) with requested ID. Returns a tuple, where first value is node ID, second - a dictionary of all node attributes. :param process_id: string object, representing an ID of parent process element. """ ...
python
def get_flows_list_by_process_id(self, process_id): """ Gets an edge (flow) with requested ID. Returns a tuple, where first value is node ID, second - a dictionary of all node attributes. :param process_id: string object, representing an ID of parent process element. """ ...
Gets an edge (flow) with requested ID. Returns a tuple, where first value is node ID, second - a dictionary of all node attributes. :param process_id: string object, representing an ID of parent process element.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L182-L194
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.create_new_diagram_graph
def create_new_diagram_graph(self, diagram_name=""): """ Initializes a new BPMN diagram and sets up a basic diagram attributes. Accepts a user-defined values for following attributes: (Diagram element) - name - default value empty string. :param diagram_name: string typ...
python
def create_new_diagram_graph(self, diagram_name=""): """ Initializes a new BPMN diagram and sets up a basic diagram attributes. Accepts a user-defined values for following attributes: (Diagram element) - name - default value empty string. :param diagram_name: string typ...
Initializes a new BPMN diagram and sets up a basic diagram attributes. Accepts a user-defined values for following attributes: (Diagram element) - name - default value empty string. :param diagram_name: string type. Represents a user-defined value of 'BPMNDiagram' element a...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L197-L212
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.add_process_to_diagram
def add_process_to_diagram(self, process_name="", process_is_closed=False, process_is_executable=False, process_type="None"): """ Adds a new process to diagram and corresponding participant process, diagram and plane Accepts a user-defined values for f...
python
def add_process_to_diagram(self, process_name="", process_is_closed=False, process_is_executable=False, process_type="None"): """ Adds a new process to diagram and corresponding participant process, diagram and plane Accepts a user-defined values for f...
Adds a new process to diagram and corresponding participant process, diagram and plane Accepts a user-defined values for following attributes: (Process element) - isClosed - default value false, - isExecutable - default value false, - processType - default value None...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L214-L244
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.add_flow_node_to_diagram
def add_flow_node_to_diagram(self, process_id, node_type, name, node_id=None): """ Helper function that adds a new Flow Node to diagram. It is used to add a new node of specified type. Adds a basic information inherited from Flow Node type. :param process_id: string object. ID of parent...
python
def add_flow_node_to_diagram(self, process_id, node_type, name, node_id=None): """ Helper function that adds a new Flow Node to diagram. It is used to add a new node of specified type. Adds a basic information inherited from Flow Node type. :param process_id: string object. ID of parent...
Helper function that adds a new Flow Node to diagram. It is used to add a new node of specified type. Adds a basic information inherited from Flow Node type. :param process_id: string object. ID of parent process, :param node_type: string object. Represents type of BPMN node passed to method, ...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L246-L271
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.add_task_to_diagram
def add_task_to_diagram(self, process_id, task_name="", node_id=None): """ Adds a Task element to BPMN diagram. User-defined attributes: - name :param process_id: string object. ID of parent process, :param task_name: string object. Name of task, :param node_id...
python
def add_task_to_diagram(self, process_id, task_name="", node_id=None): """ Adds a Task element to BPMN diagram. User-defined attributes: - name :param process_id: string object. ID of parent process, :param task_name: string object. Name of task, :param node_id...
Adds a Task element to BPMN diagram. User-defined attributes: - name :param process_id: string object. ID of parent process, :param task_name: string object. Name of task, :param node_id: string object. ID of node. Default value - None. :return: a tuple, where first va...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L273-L286
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.add_subprocess_to_diagram
def add_subprocess_to_diagram(self, process_id, subprocess_name, is_expanded=False, triggered_by_event=False, node_id=None): """ Adds a SubProcess element to BPMN diagram. User-defined attributes: - name - triggered_by_event :param pro...
python
def add_subprocess_to_diagram(self, process_id, subprocess_name, is_expanded=False, triggered_by_event=False, node_id=None): """ Adds a SubProcess element to BPMN diagram. User-defined attributes: - name - triggered_by_event :param pro...
Adds a SubProcess element to BPMN diagram. User-defined attributes: - name - triggered_by_event :param process_id: string object. ID of parent process, :param subprocess_name: string object. Name of subprocess, :param is_expanded: boolean value for attribute "isExpande...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L288-L310
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.add_start_event_to_diagram
def add_start_event_to_diagram(self, process_id, start_event_name="", start_event_definition=None, parallel_multiple=False, is_interrupting=True, node_id=None): """ Adds a StartEvent element to BPMN diagram. User-defined attributes: - name - p...
python
def add_start_event_to_diagram(self, process_id, start_event_name="", start_event_definition=None, parallel_multiple=False, is_interrupting=True, node_id=None): """ Adds a StartEvent element to BPMN diagram. User-defined attributes: - name - p...
Adds a StartEvent element to BPMN diagram. User-defined attributes: - name - parallel_multiple - is_interrupting - event definition (creates a special type of start event). Supported event definitions - * 'message': 'messageEventDefinition', * 'timer': ...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L312-L359
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.add_end_event_to_diagram
def add_end_event_to_diagram(self, process_id, end_event_name="", end_event_definition=None, node_id=None): """ Adds an EndEvent element to BPMN diagram. User-defined attributes: - name - event definition (creates a special type of end event). Supported event definitions ...
python
def add_end_event_to_diagram(self, process_id, end_event_name="", end_event_definition=None, node_id=None): """ Adds an EndEvent element to BPMN diagram. User-defined attributes: - name - event definition (creates a special type of end event). Supported event definitions ...
Adds an EndEvent element to BPMN diagram. User-defined attributes: - name - event definition (creates a special type of end event). Supported event definitions * `terminate`: 'terminateEventDefinition', * `signal`: 'signalEventDefinition', * `error`: 'error...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L361-L401
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.add_event_definition_element
def add_event_definition_element(event_type, event_definitions): """ Helper function, that creates event definition element (special type of event) from given parameters. :param event_type: string object. Short name of required event definition, :param event_definitions: dictionary of e...
python
def add_event_definition_element(event_type, event_definitions): """ Helper function, that creates event definition element (special type of event) from given parameters. :param event_type: string object. Short name of required event definition, :param event_definitions: dictionary of e...
Helper function, that creates event definition element (special type of event) from given parameters. :param event_type: string object. Short name of required event definition, :param event_definitions: dictionary of event definitions. Key is a short name of event definition, value is a full...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L404-L414
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.add_gateway_to_diagram
def add_gateway_to_diagram(self, process_id, gateway_type, gateway_name="", gateway_direction="Unspecified", node_id=None): """ Adds an exclusiveGateway element to BPMN diagram. :param process_id: string object. ID of parent process, :param gateway_type: s...
python
def add_gateway_to_diagram(self, process_id, gateway_type, gateway_name="", gateway_direction="Unspecified", node_id=None): """ Adds an exclusiveGateway element to BPMN diagram. :param process_id: string object. ID of parent process, :param gateway_type: s...
Adds an exclusiveGateway element to BPMN diagram. :param process_id: string object. ID of parent process, :param gateway_type: string object. Type of gateway to be added. :param gateway_name: string object. Name of exclusive gateway, :param gateway_direction: string object. Accepted val...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L416-L435
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.add_exclusive_gateway_to_diagram
def add_exclusive_gateway_to_diagram(self, process_id, gateway_name="", gateway_direction="Unspecified", default=None, node_id=None): """ Adds an exclusiveGateway element to BPMN diagram. :param process_id: string object. ID of parent process, :p...
python
def add_exclusive_gateway_to_diagram(self, process_id, gateway_name="", gateway_direction="Unspecified", default=None, node_id=None): """ Adds an exclusiveGateway element to BPMN diagram. :param process_id: string object. ID of parent process, :p...
Adds an exclusiveGateway element to BPMN diagram. :param process_id: string object. ID of parent process, :param gateway_name: string object. Name of exclusive gateway, :param gateway_direction: string object. Accepted values - "Unspecified", "Converging", "Diverging", "Mixed". Defa...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L437-L457
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.add_inclusive_gateway_to_diagram
def add_inclusive_gateway_to_diagram(self, process_id, gateway_name="", gateway_direction="Unspecified", default=None, node_id=None): """ Adds an inclusiveGateway element to BPMN diagram. :param process_id: string object. ID of parent process, :p...
python
def add_inclusive_gateway_to_diagram(self, process_id, gateway_name="", gateway_direction="Unspecified", default=None, node_id=None): """ Adds an inclusiveGateway element to BPMN diagram. :param process_id: string object. ID of parent process, :p...
Adds an inclusiveGateway element to BPMN diagram. :param process_id: string object. ID of parent process, :param gateway_name: string object. Name of inclusive gateway, :param gateway_direction: string object. Accepted values - "Unspecified", "Converging", "Diverging", "Mixed". Defau...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L459-L479
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.add_parallel_gateway_to_diagram
def add_parallel_gateway_to_diagram(self, process_id, gateway_name="", gateway_direction="Unspecified", node_id=None): """ Adds an parallelGateway element to BPMN diagram. :param process_id: string object. ID of parent process, :param gateway_name...
python
def add_parallel_gateway_to_diagram(self, process_id, gateway_name="", gateway_direction="Unspecified", node_id=None): """ Adds an parallelGateway element to BPMN diagram. :param process_id: string object. ID of parent process, :param gateway_name...
Adds an parallelGateway element to BPMN diagram. :param process_id: string object. ID of parent process, :param gateway_name: string object. Name of inclusive gateway, :param gateway_direction: string object. Accepted values - "Unspecified", "Converging", "Diverging", "Mixed". Defau...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L481-L499
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.add_sequence_flow_to_diagram
def add_sequence_flow_to_diagram(self, process_id, source_ref_id, target_ref_id, sequence_flow_name=""): """ Adds a SequenceFlow element to BPMN diagram. Requires that user passes a sourceRef and targetRef as parameters. User-defined attributes: - name :param proces...
python
def add_sequence_flow_to_diagram(self, process_id, source_ref_id, target_ref_id, sequence_flow_name=""): """ Adds a SequenceFlow element to BPMN diagram. Requires that user passes a sourceRef and targetRef as parameters. User-defined attributes: - name :param proces...
Adds a SequenceFlow element to BPMN diagram. Requires that user passes a sourceRef and targetRef as parameters. User-defined attributes: - name :param process_id: string object. ID of parent process, :param source_ref_id: string object. ID of source node, :param tar...
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L501-L537
KrzyHonk/bpmn-python
bpmn_python/bpmn_diagram_rep.py
BpmnDiagramGraph.get_nodes_positions
def get_nodes_positions(self): """ Getter method for nodes positions. :return: A dictionary with nodes as keys and positions as values """ nodes = self.get_nodes() output = {} for node in nodes: output[node[0]] = (float(node[1][consts.Consts.x]), floa...
python
def get_nodes_positions(self): """ Getter method for nodes positions. :return: A dictionary with nodes as keys and positions as values """ nodes = self.get_nodes() output = {} for node in nodes: output[node[0]] = (float(node[1][consts.Consts.x]), floa...
Getter method for nodes positions. :return: A dictionary with nodes as keys and positions as values
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/bpmn_diagram_rep.py#L539-L549
KrzyHonk/bpmn-python
bpmn_python/graph/classes/condition_expression_type.py
ConditionExpression.set_condition
def set_condition(self, value): """ Setter for 'condition' field. :param value - a new value of 'condition' field. Required field. Must be a String. """ if value is None or not isinstance(value, str): raise TypeError("Condition is required and must be set to a String"...
python
def set_condition(self, value): """ Setter for 'condition' field. :param value - a new value of 'condition' field. Required field. Must be a String. """ if value is None or not isinstance(value, str): raise TypeError("Condition is required and must be set to a String"...
Setter for 'condition' field. :param value - a new value of 'condition' field. Required field. Must be a String.
https://github.com/KrzyHonk/bpmn-python/blob/6e5e28e3d656dbf5bd3d85d78fe8e3f2fb462629/bpmn_python/graph/classes/condition_expression_type.py#L28-L36
benhoyt/scandir
benchmark.py
os_walk_pre_35
def os_walk_pre_35(top, topdown=True, onerror=None, followlinks=False): """Pre Python 3.5 implementation of os.walk() that doesn't use scandir.""" islink, join, isdir = os.path.islink, os.path.join, os.path.isdir try: names = os.listdir(top) except OSError as err: if onerror is not None...
python
def os_walk_pre_35(top, topdown=True, onerror=None, followlinks=False): """Pre Python 3.5 implementation of os.walk() that doesn't use scandir.""" islink, join, isdir = os.path.islink, os.path.join, os.path.isdir try: names = os.listdir(top) except OSError as err: if onerror is not None...
Pre Python 3.5 implementation of os.walk() that doesn't use scandir.
https://github.com/benhoyt/scandir/blob/982e6ba60e7165ef965567eacd7138149c9ce292/benchmark.py#L18-L44
benhoyt/scandir
benchmark.py
create_tree
def create_tree(path, depth=DEPTH): """Create a directory tree at path with given depth, and NUM_DIRS and NUM_FILES at each level. """ os.mkdir(path) for i in range(NUM_FILES): filename = os.path.join(path, 'file{0:03}.txt'.format(i)) with open(filename, 'wb') as f: f.wri...
python
def create_tree(path, depth=DEPTH): """Create a directory tree at path with given depth, and NUM_DIRS and NUM_FILES at each level. """ os.mkdir(path) for i in range(NUM_FILES): filename = os.path.join(path, 'file{0:03}.txt'.format(i)) with open(filename, 'wb') as f: f.wri...
Create a directory tree at path with given depth, and NUM_DIRS and NUM_FILES at each level.
https://github.com/benhoyt/scandir/blob/982e6ba60e7165ef965567eacd7138149c9ce292/benchmark.py#L47-L60
benhoyt/scandir
benchmark.py
get_tree_size
def get_tree_size(path): """Return total size of all files in directory tree at path.""" size = 0 try: for entry in scandir.scandir(path): if entry.is_symlink(): pass elif entry.is_dir(): size += get_tree_size(os.path.join(path, entry.name)) ...
python
def get_tree_size(path): """Return total size of all files in directory tree at path.""" size = 0 try: for entry in scandir.scandir(path): if entry.is_symlink(): pass elif entry.is_dir(): size += get_tree_size(os.path.join(path, entry.name)) ...
Return total size of all files in directory tree at path.
https://github.com/benhoyt/scandir/blob/982e6ba60e7165ef965567eacd7138149c9ce292/benchmark.py#L63-L76
ahwillia/tensortools
tensortools/operations.py
unfold
def unfold(tensor, mode): """Returns the mode-`mode` unfolding of `tensor`. Parameters ---------- tensor : ndarray mode : int Returns ------- ndarray unfolded_tensor of shape ``(tensor.shape[mode], -1)`` Author ------ Jean Kossaifi <https://github.com/tensorly> ...
python
def unfold(tensor, mode): """Returns the mode-`mode` unfolding of `tensor`. Parameters ---------- tensor : ndarray mode : int Returns ------- ndarray unfolded_tensor of shape ``(tensor.shape[mode], -1)`` Author ------ Jean Kossaifi <https://github.com/tensorly> ...
Returns the mode-`mode` unfolding of `tensor`. Parameters ---------- tensor : ndarray mode : int Returns ------- ndarray unfolded_tensor of shape ``(tensor.shape[mode], -1)`` Author ------ Jean Kossaifi <https://github.com/tensorly>
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/operations.py#L11-L28
ahwillia/tensortools
tensortools/operations.py
khatri_rao
def khatri_rao(matrices): """Khatri-Rao product of a list of matrices. Parameters ---------- matrices : list of ndarray Returns ------- khatri_rao_product: matrix of shape ``(prod(n_i), m)`` where ``prod(n_i) = prod([m.shape[0] for m in matrices])`` i.e. the product of the ...
python
def khatri_rao(matrices): """Khatri-Rao product of a list of matrices. Parameters ---------- matrices : list of ndarray Returns ------- khatri_rao_product: matrix of shape ``(prod(n_i), m)`` where ``prod(n_i) = prod([m.shape[0] for m in matrices])`` i.e. the product of the ...
Khatri-Rao product of a list of matrices. Parameters ---------- matrices : list of ndarray Returns ------- khatri_rao_product: matrix of shape ``(prod(n_i), m)`` where ``prod(n_i) = prod([m.shape[0] for m in matrices])`` i.e. the product of the number of rows of all the matrice...
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/operations.py#L31-L58
ahwillia/tensortools
tensortools/utils.py
soft_cluster_factor
def soft_cluster_factor(factor): """Returns soft-clustering of data based on CP decomposition results. Parameters ---------- data : ndarray, N x R matrix of nonnegative data Datapoints are held in rows, features are held in columns Returns ------- cluster_ids : ndarray, vector of N...
python
def soft_cluster_factor(factor): """Returns soft-clustering of data based on CP decomposition results. Parameters ---------- data : ndarray, N x R matrix of nonnegative data Datapoints are held in rows, features are held in columns Returns ------- cluster_ids : ndarray, vector of N...
Returns soft-clustering of data based on CP decomposition results. Parameters ---------- data : ndarray, N x R matrix of nonnegative data Datapoints are held in rows, features are held in columns Returns ------- cluster_ids : ndarray, vector of N integers in range(0, R) List of...
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/utils.py#L12-L42
ahwillia/tensortools
tensortools/utils.py
tsp_linearize
def tsp_linearize(data, niter=1000, metric='euclidean', **kwargs): """Sorts a matrix dataset to (approximately) solve the traveling salesperson problem. The matrix can be re-sorted so that sequential rows represent datapoints that are close to each other based on some user-defined distance metric. Uses ...
python
def tsp_linearize(data, niter=1000, metric='euclidean', **kwargs): """Sorts a matrix dataset to (approximately) solve the traveling salesperson problem. The matrix can be re-sorted so that sequential rows represent datapoints that are close to each other based on some user-defined distance metric. Uses ...
Sorts a matrix dataset to (approximately) solve the traveling salesperson problem. The matrix can be re-sorted so that sequential rows represent datapoints that are close to each other based on some user-defined distance metric. Uses 2-opt local search algorithm. Args ---- data : ndarray, N x R...
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/utils.py#L45-L81
ahwillia/tensortools
tensortools/utils.py
hclust_linearize
def hclust_linearize(U): """Sorts the rows of a matrix by hierarchical clustering. Parameters: U (ndarray) : matrix of data Returns: prm (ndarray) : permutation of the rows """ from scipy.cluster import hierarchy Z = hierarchy.ward(U) return hierarchy.leaves_list(hierarchy...
python
def hclust_linearize(U): """Sorts the rows of a matrix by hierarchical clustering. Parameters: U (ndarray) : matrix of data Returns: prm (ndarray) : permutation of the rows """ from scipy.cluster import hierarchy Z = hierarchy.ward(U) return hierarchy.leaves_list(hierarchy...
Sorts the rows of a matrix by hierarchical clustering. Parameters: U (ndarray) : matrix of data Returns: prm (ndarray) : permutation of the rows
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/utils.py#L84-L96
ahwillia/tensortools
tensortools/utils.py
reverse_segment
def reverse_segment(path, n1, n2): """Reverse the nodes between n1 and n2. """ q = path.copy() if n2 > n1: q[n1:(n2+1)] = path[n1:(n2+1)][::-1] return q else: seg = np.hstack((path[n1:], path[:(n2+1)]))[::-1] brk = len(q) - n1 q[n1:] = seg[:brk] q[:(n2...
python
def reverse_segment(path, n1, n2): """Reverse the nodes between n1 and n2. """ q = path.copy() if n2 > n1: q[n1:(n2+1)] = path[n1:(n2+1)][::-1] return q else: seg = np.hstack((path[n1:], path[:(n2+1)]))[::-1] brk = len(q) - n1 q[n1:] = seg[:brk] q[:(n2...
Reverse the nodes between n1 and n2.
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/utils.py#L99-L111
ahwillia/tensortools
tensortools/utils.py
_solve_tsp
def _solve_tsp(dist, niter): """Solve travelling salesperson problem (TSP) by two-opt swapping. Params ------ dist (ndarray) : distance matrix Returns ------- path (ndarray) : permutation of nodes in graph (rows of dist matrix) """ # number of nodes N = dist.shape[0] # ts...
python
def _solve_tsp(dist, niter): """Solve travelling salesperson problem (TSP) by two-opt swapping. Params ------ dist (ndarray) : distance matrix Returns ------- path (ndarray) : permutation of nodes in graph (rows of dist matrix) """ # number of nodes N = dist.shape[0] # ts...
Solve travelling salesperson problem (TSP) by two-opt swapping. Params ------ dist (ndarray) : distance matrix Returns ------- path (ndarray) : permutation of nodes in graph (rows of dist matrix)
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/utils.py#L114-L190
ahwillia/tensortools
tensortools/tensors.py
KTensor.full
def full(self): """Converts KTensor to a dense ndarray.""" # Compute tensor unfolding along first mode unf = sci.dot(self.factors[0], khatri_rao(self.factors[1:]).T) # Inverse unfolding along first mode return sci.reshape(unf, self.shape)
python
def full(self): """Converts KTensor to a dense ndarray.""" # Compute tensor unfolding along first mode unf = sci.dot(self.factors[0], khatri_rao(self.factors[1:]).T) # Inverse unfolding along first mode return sci.reshape(unf, self.shape)
Converts KTensor to a dense ndarray.
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/tensors.py#L41-L48
ahwillia/tensortools
tensortools/tensors.py
KTensor.rebalance
def rebalance(self): """Rescales factors across modes so that all norms match. """ # Compute norms along columns for each factor matrix norms = [sci.linalg.norm(f, axis=0) for f in self.factors] # Multiply norms across all modes lam = sci.multiply.reduce(norms) ** (1/se...
python
def rebalance(self): """Rescales factors across modes so that all norms match. """ # Compute norms along columns for each factor matrix norms = [sci.linalg.norm(f, axis=0) for f in self.factors] # Multiply norms across all modes lam = sci.multiply.reduce(norms) ** (1/se...
Rescales factors across modes so that all norms match.
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/tensors.py#L50-L62
ahwillia/tensortools
tensortools/tensors.py
KTensor.permute
def permute(self, idx): """Permutes the columns of the factor matrices inplace """ # Check that input is a true permutation if set(idx) != set(range(self.rank)): raise ValueError('Invalid permutation specified.') # Update factors self.factors = [f[:, idx] fo...
python
def permute(self, idx): """Permutes the columns of the factor matrices inplace """ # Check that input is a true permutation if set(idx) != set(range(self.rank)): raise ValueError('Invalid permutation specified.') # Update factors self.factors = [f[:, idx] fo...
Permutes the columns of the factor matrices inplace
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/tensors.py#L64-L74
ahwillia/tensortools
tensortools/diagnostics.py
kruskal_align
def kruskal_align(U, V, permute_U=False, permute_V=False): """Aligns two KTensors and returns a similarity score. Parameters ---------- U : KTensor First kruskal tensor to align. V : KTensor Second kruskal tensor to align. permute_U : bool If True, modifies 'U' to align ...
python
def kruskal_align(U, V, permute_U=False, permute_V=False): """Aligns two KTensors and returns a similarity score. Parameters ---------- U : KTensor First kruskal tensor to align. V : KTensor Second kruskal tensor to align. permute_U : bool If True, modifies 'U' to align ...
Aligns two KTensors and returns a similarity score. Parameters ---------- U : KTensor First kruskal tensor to align. V : KTensor Second kruskal tensor to align. permute_U : bool If True, modifies 'U' to align the KTensors (default is False). permute_V : bool If T...
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/diagnostics.py#L9-L95
ahwillia/tensortools
tensortools/visualization.py
plot_objective
def plot_objective(ensemble, partition='train', ax=None, jitter=0.1, scatter_kw=dict(), line_kw=dict()): """Plots objective function as a function of model rank. Parameters ---------- ensemble : Ensemble object holds optimization results across a range of model ranks part...
python
def plot_objective(ensemble, partition='train', ax=None, jitter=0.1, scatter_kw=dict(), line_kw=dict()): """Plots objective function as a function of model rank. Parameters ---------- ensemble : Ensemble object holds optimization results across a range of model ranks part...
Plots objective function as a function of model rank. Parameters ---------- ensemble : Ensemble object holds optimization results across a range of model ranks partition : string, one of: {'train', 'test'} specifies whether to plot the objective function on the training data or ...
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/visualization.py#L11-L61
ahwillia/tensortools
tensortools/visualization.py
plot_similarity
def plot_similarity(ensemble, ax=None, jitter=0.1, scatter_kw=dict(), line_kw=dict()): """Plots similarity across optimization runs as a function of model rank. Parameters ---------- ensemble : Ensemble object holds optimization results across a range of model ranks ax :...
python
def plot_similarity(ensemble, ax=None, jitter=0.1, scatter_kw=dict(), line_kw=dict()): """Plots similarity across optimization runs as a function of model rank. Parameters ---------- ensemble : Ensemble object holds optimization results across a range of model ranks ax :...
Plots similarity across optimization runs as a function of model rank. Parameters ---------- ensemble : Ensemble object holds optimization results across a range of model ranks ax : matplotlib axis (optional) axis to plot on (defaults to current axis object) jitter : float (optional...
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/visualization.py#L64-L113
ahwillia/tensortools
tensortools/visualization.py
plot_factors
def plot_factors(U, plots='line', fig=None, axes=None, scatter_kw=dict(), line_kw=dict(), bar_kw=dict(), **kwargs): """Plots a KTensor. Note: Each keyword option is broadcast to all modes of the KTensor. For example, if `U` is a 3rd-order tensor (i.e. `U.ndim == 3`) then `plot_factors(...
python
def plot_factors(U, plots='line', fig=None, axes=None, scatter_kw=dict(), line_kw=dict(), bar_kw=dict(), **kwargs): """Plots a KTensor. Note: Each keyword option is broadcast to all modes of the KTensor. For example, if `U` is a 3rd-order tensor (i.e. `U.ndim == 3`) then `plot_factors(...
Plots a KTensor. Note: Each keyword option is broadcast to all modes of the KTensor. For example, if `U` is a 3rd-order tensor (i.e. `U.ndim == 3`) then `plot_factors(U, plots=['line','bar','scatter'])` plots all factors for the first mode as a line plot, the second as a bar plot, and the third mode as...
https://github.com/ahwillia/tensortools/blob/f375633ec621caa96665a56205dcf932590d4a6e/tensortools/visualization.py#L116-L245