Members
(constant) DiffConfig :Object
Configuration object for the difference algorithm.
Type:
- Object
- Source:
(constant) Dsl :Object
Object containing information about the Domain Specific Language of the
Cloud Process Execution Engine and the change model of CpeeDiff.
Type:
- Object
- Source:
- See:
-
(constant) EvalConfig :Object
Configuration object for the automated evaluation framework.
Type:
- Object
- Source:
(constant) primeList :Array.<Number>
List of the first 10.000 primes in ascending order.
Type:
- Array.<Number>
- Source:
Methods
getLcsLength(seqA, seqB, compare) → {Number}
Compute the length of the longest common subsequence (LCS) between two
sequences. A simple dynamic programming approach is employed, which yields
O(n*m) time complexity and O(n*m) space complexity.
Parameters:
Name | Type | Description |
---|---|---|
seqA |
Array.<any> | The first sequence. |
seqB |
Array.<any> | The second sequence. |
compare |
function | The comparator function used to identify equal elements between the sequences. Defaults to the built-in strict equality operator ("==="). |
- Source:
Returns:
The length of the LCS.
- Type
- Number
getLcsLengthFast(seqA, seqB) → {Number}
Faster LCS computation for sequences of maximum length r (path compare
range) due to matrix reuse.
Parameters:
Name | Type | Description |
---|---|---|
seqA |
Array.<Number> | The first sequence. |
seqB |
Array.<Number> | The second sequence. |
- Source:
Returns:
The length of the LCS.
- Type
- Number
getLis(arr) → {Array.<Number>}
Compute the longest increasing subsequence (LIS) within an array of integers.
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array.<Number> | The array. |
- Source:
Returns:
The indices of all elements belonging to the LIS.
- Type
- Array.<Number>
getPrimes(amount) → {Array.<Number>}
Get a desired amount of primes.
Parameters:
Name | Type | Description |
---|---|---|
amount |
Number | The desired number of primes |
- Source:
Returns:
- Type
- Array.<Number>
persistBestMatches(oldNodes, newNodes, matching, keyFunction, compareFunction, matchHandler, thresholdFunction)
Persist the best matches. For each new node, the old node with the lowest
comparison value is chosen, as long as that node is not matched to another
node with a lower comparison value. Nodes are considered in the order they
are passed to this function.
Parameters:
Name | Type | Description |
---|---|---|
oldNodes |
Array.<Node> | The nodes of the old tree to consider for a matching |
newNodes |
Array.<Node> | The nodes of the new tree to consider for a matching |
matching |
Matching | The existing matching to be extended |
keyFunction |
function | A function mapping each node to a key. Only nodes with the same key can be matched. The key can be a hash value or the node label. |
compareFunction |
function | A function mapping each pair of nodes to a comparison value from the range [0;1]. |
matchHandler |
function | A function to execute when two nodes are chosen for a match. |
thresholdFunction |
function | A boolean function to determine if a comparison value is sufficient for a match. |
- Source:
stringHash(str) → {Number}
Compute a 32-bit hash value for a string using the murmur3 hashing algorithm.
Parameters:
Name | Type | Description |
---|---|---|
str |
String |
- Source:
Returns:
The 32-bit hash value as an integer
- Type
- Number