LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
wf_link_matrix.h File Reference

Shared conventions of the workflow pattern detectors. More...

#include <cstddef>
#include <map>
#include <set>
#include <vector>
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for wf_link_matrix.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::wf

Detailed Description

Shared conventions of the workflow pattern detectors.

The four detectors ported from jar/src/main/java/jline/api/wf/ all read the same "link matrix": one row per directed edge, column 0 the source node id, column 1 the target node id, column 2 the routing probability of the edge. Node ids are integers carried in the numeric type, exactly as the Java Matrix does, so this header only holds the accessor that turns column 0 or 1 back into an id (truncating, like the Java (int) cast) and the adjacency builders that three of the four detectors would otherwise duplicate.

DIVERGENCE, deliberate: the Java detectors key their adjacency on HashMap and collect results in HashSet, so the ORDER of the detected patterns, and in findCommonJoinPoint even WHICH join point is returned, depend on Java's hash iteration order. That is not a property of the workflow. The port uses ordered containers throughout, so every result is in ascending node order and is reproducible; where the Java picks an arbitrary element of a set the port picks the smallest. Sets of size one - the only case the callers validate - are unaffected.

Definition in file wf_link_matrix.h.