![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Parallel (fork-join) pattern detection in a workflow network. More...
#include <cstddef>#include <deque>#include <map>#include <set>#include <vector>#include "line/api/wf/wf_link_matrix.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::wf::ParallelStats< T > |
| Mirrors the Java getParallelStats map. More... | |
Namespaces | |
| namespace | line |
| namespace | line::wf |
Functions | |
| template<class T> | |
| std::vector< std::vector< int > > | line::wf::detect_parallel (const Matrix< T > &linkMatrix, const std::vector< int > &serviceNodes, const std::vector< int > &forkNodes, const std::vector< int > &joinNodes) |
| template<class T> | |
| bool | line::wf::validate_parallel_pattern (const std::vector< int > &pattern, const Matrix< T > &linkMatrix, const std::vector< int > &forkNodes, const std::vector< int > &joinNodes) |
| A pattern is valid when its nodes have exactly one common fork predecessor and exactly one common join successor. | |
| template<class T> | |
| ParallelStats< T > | line::wf::get_parallel_stats (const std::vector< std::vector< int > > &patterns) |
| Count, total, mean and maximum degree of parallelism. | |
Parallel (fork-join) pattern detection in a workflow network.
Templated port of jar/src/main/java/jline/api/wf/Wf_parallel_detector.java (no MATLAB counterpart, so the JAR is the reference). A fork f and a join j form a pair when a breadth-first path count from f, forbidden to pass through any other fork or join, reaches j along more than one path; the parallel branches of that pair are then the service nodes that are both reachable from f without passing through j and able to reach j without passing through f. A pair contributes a pattern only when it has at least two such service nodes.
detect_parallel, validate_parallel_pattern and get_parallel_stats are the three public methods of the Java class, kept 1:1.
Pure graph traversal; the only arithmetic is the mean branch count, one division. Finite field computation, instantiates at exact arithmetic, no transcendental gate.
Definition in file wf_parallel_detector.h.