I want to specify the length of edges in cytoscape.js. I see the layout options have the following parameters:
// different methods of specifying edge length
// each can be a constant numerical value or a function like `function( edge ){ return 2; }`
edgeLength: function( edge ){var len = parseInt(edge.data('weight')); return len; }, // sets edge length directly in simulation
edgeSymDiffLength: undefined, // symmetric diff edge length in simulation
edgeJaccardLength: undefined, // jaccard edge length in simulation
I understand edgeLength and have found examples using it, but
I have been unable to find any definitions or examples of what edgeSymDiffLength and edgeJaccardLength mean.
Is there any difference between the three functions? Are they used at different times in the layout process or on different types of edges? If not, why are there three named functions?
An example would be appreciated or a pointer to the proper documentation. Searches for edgeJaccardLength doesn't turn anything up for me.
I have tried using google and Bing to search for edgeJaccardLength and only find the layout options lines listed above.
I did find a definition of the CoLa algorithm, which appears to be what cytoscape is using.
Looking at https://github.com/tgdwyer/WebCola/blob/fe5da618c910cbe97a98cb7cad859f1189fbda1d/WebCola/src/layout.ts#L456, I see the definition of symmetricDiffLinkLengths and jaccardLinkLengths, but the comments for jaccardLinkLengths are the same as those for symmetricDiffLinkLengths, so I am wondering if there is no actual difference and we can just use the single function for edgeLength.