Utilizes setImmediate if available, otherwise falls back to setTimeout
Defines a Node of a tree as containing a label and an array of children.
The guts of the pq-gram algorithm
Convenience for profile.js and differs slightly from the Python PyGram implementation from which jqgram was originally ported.
The jqgram object exposes one method and three constructors, however in typical usage, only the distance method is used. Node, Profile, and ShiftRegister are however exposed for custom requirements.
Allows easy generation of two profiles defined by root nodes, and returns the resulting pq-gram edit distance approximation. Please see the examples on github for more details on how to use the distance function to define the trees, the p and q options, and the callback (cb) function that is provided with the resulting pq-gram edit distance.
allow jqgram to be utilized in browser or node environments:
JQGram