code: function (points, dims, opt_factor) {
          var factor = opt_factor || 1e5;
          var flatPoints = [];
  
          var pointsLength = points.length;
          for (var i = 0; i < pointsLength; ++i) {
              var point = points[i];
  
              for (var dim = 0; dim < dims; ++dim) {
                  flatPoints.push(point[dim]);
              }
          }
  
          return this.encodeDeltas(flatPoints, dims, factor);
      }
docs: APIMethod: encode
  Serialize an array of n-dimensional points and return an encoded string
  
  Parameters:
  points - {Array(Array(int))} An array containing n-dimensional
  arrays of coordinates
  dims - {int} The dimension of the points that should be read
  
  Returns:
  {String} An encoded string