code: function alterneigh(rad, i, b, g, r) {
  
      var j;
      var k;
      var lo;
      var hi;
      var a;
      var m;
      var p;
  
      lo = i - rad;
      if (lo < -1) lo = -1;
  
      hi = i + rad;
      if (hi > netsize) hi = netsize;
  
      j = i + 1;
      k = i - 1;
      m = 1;
  
      while ((j < hi) || (k > lo)) {
        a = radpower[m++];
  
        if (j < hi) {
          p = network[j++];
  
          try {
            p[0] -= (a * (p[0] - b)) / alpharadbias;
            p[1] -= (a * (p[1] - g)) / alpharadbias;
            p[2] -= (a * (p[2] - r)) / alpharadbias;
          } catch (e) { } // prevents 1.3 miscompilation
        }
  
        if (k > lo) {
          p = network[k--];
  
          try {
            p[0] -= (a * (p[0] - b)) / alpharadbias;
            p[1] -= (a * (p[1] - g)) / alpharadbias;
            p[2] -= (a * (p[2] - r)) / alpharadbias;
          } catch (e) { }
        }
      }
    }
docs: /*
  Move adjacent neurons by precomputed alpha*(1-((i-j)^2/[r]^2)) in
  radpower[|i-j|]
  ---------------------------------------------------------------------------------