<commit_before>/*
 * Lays out the given graph.
 *
 * NOTE: this is a work in progress.
 */
dig.dot.layout = function(g) {
  var aux = g.copy();
  dig.dot.layout.rank(aux);
  dig.dot.layout.addDummyNodes(aux);
  dig.dot.layout.order(aux);
  dig.dot.layout.position()
    .graph(aux);

  dig_util_forEach(aux.nodes(), function(u) {
    if (g.hasNode(u)) {
      g.node(u).x = aux.node(u).x;
      g.node(u).y = aux.node(u).y;
    }<commit_msg>Record edge points in resulting graph<commit_after>/*
 * Lays out the given graph.
 *
 * NOTE: this is a work in progress.
 */
dig.dot.layout = function(g) {
  var aux = g.copy();
  dig.dot.layout.rank(aux);
  dig.dot.layout.addDummyNodes(aux);
  dig.dot.layout.order(aux);
  dig.dot.layout.position()
    .graph(aux);

  dig_util_forEach(aux.nodes(), function(u) {
    var auxAttrs = aux.node(u);
    if (g.hasNode(u)) {
      g.node(u).x = auxAttrs.x;
      g.node(u).y = auxAttrs.y;
    } else if (auxAttrs.dummy) {
      var edgeAttrs = g.edge(auxAttrs.source, auxAttrs.sink);
      var points = edgeAttrs.points || [];
      points[auxAttrs.dummyIdx] = {x: auxAttrs.x, y: auxAttrs.y};
      edgeAttrs.points = points;
    }
{'fraction_non_alphanumeric': 0.17621899059024806, 'fraction_numerical': 0.0, 'mean_word_length': 2.8870431893687707, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5286450', 'n_tokens_mistral': 461, 'n_tokens_neox': 457, 'n_words': 87}