Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
d3-shape.js2142 linesDownload Raw Back to dist
1// https://d3js.org/d3-shape/ v3.2.0 Copyright 2010-2022 Mike Bostock2(function (global, factory) {3typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-path')) :4typeof define === 'function' && define.amd ? define(['exports', 'd3-path'], factory) :5(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.d3 = global.d3 || {}, global.d3));6})(this, (function (exports, d3Path) { 'use strict';7 8function constant(x) {9  return function constant() {10    return x;11  };12}13 14const abs = Math.abs;15const atan2 = Math.atan2;16const cos = Math.cos;17const max = Math.max;18const min = Math.min;19const sin = Math.sin;20const sqrt = Math.sqrt;21 22const epsilon = 1e-12;23const pi = Math.PI;24const halfPi = pi / 2;25const tau = 2 * pi;26 27function acos(x) {28  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);29}30 31function asin(x) {32  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);33}34 35function withPath(shape) {36  let digits = 3;37 38  shape.digits = function(_) {39    if (!arguments.length) return digits;40    if (_ == null) {41      digits = null;42    } else {43      const d = Math.floor(_);44      if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);45      digits = d;46    }47    return shape;48  };49 50  return () => new d3Path.Path(digits);51}52 53function arcInnerRadius(d) {54  return d.innerRadius;55}56 57function arcOuterRadius(d) {58  return d.outerRadius;59}60 61function arcStartAngle(d) {62  return d.startAngle;63}64 65function arcEndAngle(d) {66  return d.endAngle;67}68 69function arcPadAngle(d) {70  return d && d.padAngle; // Note: optional!71}72 73function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {74  var x10 = x1 - x0, y10 = y1 - y0,75      x32 = x3 - x2, y32 = y3 - y2,76      t = y32 * x10 - x32 * y10;77  if (t * t < epsilon) return;78  t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;79  return [x0 + t * x10, y0 + t * y10];80}81 82// Compute perpendicular offset line of length rc.83// http://mathworld.wolfram.com/Circle-LineIntersection.html84function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {85  var x01 = x0 - x1,86      y01 = y0 - y1,87      lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),88      ox = lo * y01,89      oy = -lo * x01,90      x11 = x0 + ox,91      y11 = y0 + oy,92      x10 = x1 + ox,93      y10 = y1 + oy,94      x00 = (x11 + x10) / 2,95      y00 = (y11 + y10) / 2,96      dx = x10 - x11,97      dy = y10 - y11,98      d2 = dx * dx + dy * dy,99      r = r1 - rc,100      D = x11 * y10 - x10 * y11,101      d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),102      cx0 = (D * dy - dx * d) / d2,103      cy0 = (-D * dx - dy * d) / d2,104      cx1 = (D * dy + dx * d) / d2,105      cy1 = (-D * dx + dy * d) / d2,106      dx0 = cx0 - x00,107      dy0 = cy0 - y00,108      dx1 = cx1 - x00,109      dy1 = cy1 - y00;110 111  // Pick the closer of the two intersection points.112  // TODO Is there a faster way to determine which intersection to use?113  if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;114 115  return {116    cx: cx0,117    cy: cy0,118    x01: -ox,119    y01: -oy,120    x11: cx0 * (r1 / r - 1),121    y11: cy0 * (r1 / r - 1)122  };123}124 125function arc() {126  var innerRadius = arcInnerRadius,127      outerRadius = arcOuterRadius,128      cornerRadius = constant(0),129      padRadius = null,130      startAngle = arcStartAngle,131      endAngle = arcEndAngle,132      padAngle = arcPadAngle,133      context = null,134      path = withPath(arc);135 136  function arc() {137    var buffer,138        r,139        r0 = +innerRadius.apply(this, arguments),140        r1 = +outerRadius.apply(this, arguments),141        a0 = startAngle.apply(this, arguments) - halfPi,142        a1 = endAngle.apply(this, arguments) - halfPi,143        da = abs(a1 - a0),144        cw = a1 > a0;145 146    if (!context) context = buffer = path();147 148    // Ensure that the outer radius is always larger than the inner radius.149    if (r1 < r0) r = r1, r1 = r0, r0 = r;150 151    // Is it a point?152    if (!(r1 > epsilon)) context.moveTo(0, 0);153 154    // Or is it a circle or annulus?155    else if (da > tau - epsilon) {156      context.moveTo(r1 * cos(a0), r1 * sin(a0));157      context.arc(0, 0, r1, a0, a1, !cw);158      if (r0 > epsilon) {159        context.moveTo(r0 * cos(a1), r0 * sin(a1));160        context.arc(0, 0, r0, a1, a0, cw);161      }162    }163 164    // Or is it a circular or annular sector?165    else {166      var a01 = a0,167          a11 = a1,168          a00 = a0,169          a10 = a1,170          da0 = da,171          da1 = da,172          ap = padAngle.apply(this, arguments) / 2,173          rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),174          rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),175          rc0 = rc,176          rc1 = rc,177          t0,178          t1;179 180      // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.181      if (rp > epsilon) {182        var p0 = asin(rp / r0 * sin(ap)),183            p1 = asin(rp / r1 * sin(ap));184        if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;185        else da0 = 0, a00 = a10 = (a0 + a1) / 2;186        if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;187        else da1 = 0, a01 = a11 = (a0 + a1) / 2;188      }189 190      var x01 = r1 * cos(a01),191          y01 = r1 * sin(a01),192          x10 = r0 * cos(a10),193          y10 = r0 * sin(a10);194 195      // Apply rounded corners?196      if (rc > epsilon) {197        var x11 = r1 * cos(a11),198            y11 = r1 * sin(a11),199            x00 = r0 * cos(a00),200            y00 = r0 * sin(a00),201            oc;202 203        // Restrict the corner radius according to the sector angle. If this204        // intersection fails, it’s probably because the arc is too small, so205        // disable the corner radius entirely.206        if (da < pi) {207          if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {208            var ax = x01 - oc[0],209                ay = y01 - oc[1],210                bx = x11 - oc[0],211                by = y11 - oc[1],212                kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),213                lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);214            rc0 = min(rc, (r0 - lc) / (kc - 1));215            rc1 = min(rc, (r1 - lc) / (kc + 1));216          } else {217            rc0 = rc1 = 0;218          }219        }220      }221 222      // Is the sector collapsed to a line?223      if (!(da1 > epsilon)) context.moveTo(x01, y01);224 225      // Does the sector’s outer ring have rounded corners?226      else if (rc1 > epsilon) {227        t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);228        t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);229 230        context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);231 232        // Have the corners merged?233        if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);234 235        // Otherwise, draw the two corners and the ring.236        else {237          context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);238          context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);239          context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);240        }241      }242 243      // Or is the outer ring just a circular arc?244      else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);245 246      // Is there no inner ring, and it’s a circular sector?247      // Or perhaps it’s an annular sector collapsed due to padding?248      if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);249 250      // Does the sector’s inner ring (or point) have rounded corners?251      else if (rc0 > epsilon) {252        t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);253        t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);254 255        context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);256 257        // Have the corners merged?258        if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);259 260        // Otherwise, draw the two corners and the ring.261        else {262          context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);263          context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);264          context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);265        }266      }267 268      // Or is the inner ring just a circular arc?269      else context.arc(0, 0, r0, a10, a00, cw);270    }271 272    context.closePath();273 274    if (buffer) return context = null, buffer + "" || null;275  }276 277  arc.centroid = function() {278    var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,279        a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;280    return [cos(a) * r, sin(a) * r];281  };282 283  arc.innerRadius = function(_) {284    return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius;285  };286 287  arc.outerRadius = function(_) {288    return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius;289  };290 291  arc.cornerRadius = function(_) {292    return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius;293  };294 295  arc.padRadius = function(_) {296    return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius;297  };298 299  arc.startAngle = function(_) {300    return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle;301  };302 303  arc.endAngle = function(_) {304    return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle;305  };306 307  arc.padAngle = function(_) {308    return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle;309  };310 311  arc.context = function(_) {312    return arguments.length ? ((context = _ == null ? null : _), arc) : context;313  };314 315  return arc;316}317 318var slice = Array.prototype.slice;319 320function array(x) {321  return typeof x === "object" && "length" in x322    ? x // Array, TypedArray, NodeList, array-like323    : Array.from(x); // Map, Set, iterable, string, or anything else324}325 326function Linear(context) {327  this._context = context;328}329 330Linear.prototype = {331  areaStart: function() {332    this._line = 0;333  },334  areaEnd: function() {335    this._line = NaN;336  },337  lineStart: function() {338    this._point = 0;339  },340  lineEnd: function() {341    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();342    this._line = 1 - this._line;343  },344  point: function(x, y) {345    x = +x, y = +y;346    switch (this._point) {347      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;348      case 1: this._point = 2; // falls through349      default: this._context.lineTo(x, y); break;350    }351  }352};353 354function curveLinear(context) {355  return new Linear(context);356}357 358function x(p) {359  return p[0];360}361 362function y(p) {363  return p[1];364}365 366function line(x$1, y$1) {367  var defined = constant(true),368      context = null,369      curve = curveLinear,370      output = null,371      path = withPath(line);372 373  x$1 = typeof x$1 === "function" ? x$1 : (x$1 === undefined) ? x : constant(x$1);374  y$1 = typeof y$1 === "function" ? y$1 : (y$1 === undefined) ? y : constant(y$1);375 376  function line(data) {377    var i,378        n = (data = array(data)).length,379        d,380        defined0 = false,381        buffer;382 383    if (context == null) output = curve(buffer = path());384 385    for (i = 0; i <= n; ++i) {386      if (!(i < n && defined(d = data[i], i, data)) === defined0) {387        if (defined0 = !defined0) output.lineStart();388        else output.lineEnd();389      }390      if (defined0) output.point(+x$1(d, i, data), +y$1(d, i, data));391    }392 393    if (buffer) return output = null, buffer + "" || null;394  }395 396  line.x = function(_) {397    return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), line) : x$1;398  };399 400  line.y = function(_) {401    return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), line) : y$1;402  };403 404  line.defined = function(_) {405    return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line) : defined;406  };407 408  line.curve = function(_) {409    return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;410  };411 412  line.context = function(_) {413    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;414  };415 416  return line;417}418 419function area(x0, y0, y1) {420  var x1 = null,421      defined = constant(true),422      context = null,423      curve = curveLinear,424      output = null,425      path = withPath(area);426 427  x0 = typeof x0 === "function" ? x0 : (x0 === undefined) ? x : constant(+x0);428  y0 = typeof y0 === "function" ? y0 : (y0 === undefined) ? constant(0) : constant(+y0);429  y1 = typeof y1 === "function" ? y1 : (y1 === undefined) ? y : constant(+y1);430 431  function area(data) {432    var i,433        j,434        k,435        n = (data = array(data)).length,436        d,437        defined0 = false,438        buffer,439        x0z = new Array(n),440        y0z = new Array(n);441 442    if (context == null) output = curve(buffer = path());443 444    for (i = 0; i <= n; ++i) {445      if (!(i < n && defined(d = data[i], i, data)) === defined0) {446        if (defined0 = !defined0) {447          j = i;448          output.areaStart();449          output.lineStart();450        } else {451          output.lineEnd();452          output.lineStart();453          for (k = i - 1; k >= j; --k) {454            output.point(x0z[k], y0z[k]);455          }456          output.lineEnd();457          output.areaEnd();458        }459      }460      if (defined0) {461        x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);462        output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);463      }464    }465 466    if (buffer) return output = null, buffer + "" || null;467  }468 469  function arealine() {470    return line().defined(defined).curve(curve).context(context);471  }472 473  area.x = function(_) {474    return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), x1 = null, area) : x0;475  };476 477  area.x0 = function(_) {478    return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), area) : x0;479  };480 481  area.x1 = function(_) {482    return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : x1;483  };484 485  area.y = function(_) {486    return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), y1 = null, area) : y0;487  };488 489  area.y0 = function(_) {490    return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), area) : y0;491  };492 493  area.y1 = function(_) {494    return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : y1;495  };496 497  area.lineX0 =498  area.lineY0 = function() {499    return arealine().x(x0).y(y0);500  };501 502  area.lineY1 = function() {503    return arealine().x(x0).y(y1);504  };505 506  area.lineX1 = function() {507    return arealine().x(x1).y(y0);508  };509 510  area.defined = function(_) {511    return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), area) : defined;512  };513 514  area.curve = function(_) {515    return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;516  };517 518  area.context = function(_) {519    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;520  };521 522  return area;523}524 525function descending$1(a, b) {526  return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;527}528 529function identity(d) {530  return d;531}532 533function pie() {534  var value = identity,535      sortValues = descending$1,536      sort = null,537      startAngle = constant(0),538      endAngle = constant(tau),539      padAngle = constant(0);540 541  function pie(data) {542    var i,543        n = (data = array(data)).length,544        j,545        k,546        sum = 0,547        index = new Array(n),548        arcs = new Array(n),549        a0 = +startAngle.apply(this, arguments),550        da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),551        a1,552        p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),553        pa = p * (da < 0 ? -1 : 1),554        v;555 556    for (i = 0; i < n; ++i) {557      if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {558        sum += v;559      }560    }561 562    // Optionally sort the arcs by previously-computed values or by data.563    if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });564    else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });565 566    // Compute the arcs! They are stored in the original data's order.567    for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {568      j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {569        data: data[j],570        index: i,571        value: v,572        startAngle: a0,573        endAngle: a1,574        padAngle: p575      };576    }577 578    return arcs;579  }580 581  pie.value = function(_) {582    return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), pie) : value;583  };584 585  pie.sortValues = function(_) {586    return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;587  };588 589  pie.sort = function(_) {590    return arguments.length ? (sort = _, sortValues = null, pie) : sort;591  };592 593  pie.startAngle = function(_) {594    return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), pie) : startAngle;595  };596 597  pie.endAngle = function(_) {598    return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), pie) : endAngle;599  };600 601  pie.padAngle = function(_) {602    return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), pie) : padAngle;603  };604 605  return pie;606}607 608var curveRadialLinear = curveRadial(curveLinear);609 610function Radial(curve) {611  this._curve = curve;612}613 614Radial.prototype = {615  areaStart: function() {616    this._curve.areaStart();617  },618  areaEnd: function() {619    this._curve.areaEnd();620  },621  lineStart: function() {622    this._curve.lineStart();623  },624  lineEnd: function() {625    this._curve.lineEnd();626  },627  point: function(a, r) {628    this._curve.point(r * Math.sin(a), r * -Math.cos(a));629  }630};631 632function curveRadial(curve) {633 634  function radial(context) {635    return new Radial(curve(context));636  }637 638  radial._curve = curve;639 640  return radial;641}642 643function lineRadial(l) {644  var c = l.curve;645 646  l.angle = l.x, delete l.x;647  l.radius = l.y, delete l.y;648 649  l.curve = function(_) {650    return arguments.length ? c(curveRadial(_)) : c()._curve;651  };652 653  return l;654}655 656function lineRadial$1() {657  return lineRadial(line().curve(curveRadialLinear));658}659 660function areaRadial() {661  var a = area().curve(curveRadialLinear),662      c = a.curve,663      x0 = a.lineX0,664      x1 = a.lineX1,665      y0 = a.lineY0,666      y1 = a.lineY1;667 668  a.angle = a.x, delete a.x;669  a.startAngle = a.x0, delete a.x0;670  a.endAngle = a.x1, delete a.x1;671  a.radius = a.y, delete a.y;672  a.innerRadius = a.y0, delete a.y0;673  a.outerRadius = a.y1, delete a.y1;674  a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0;675  a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1;676  a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0;677  a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1;678 679  a.curve = function(_) {680    return arguments.length ? c(curveRadial(_)) : c()._curve;681  };682 683  return a;684}685 686function pointRadial(x, y) {687  return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];688}689 690class Bump {691  constructor(context, x) {692    this._context = context;693    this._x = x;694  }695  areaStart() {696    this._line = 0;697  }698  areaEnd() {699    this._line = NaN;700  }701  lineStart() {702    this._point = 0;703  }704  lineEnd() {705    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();706    this._line = 1 - this._line;707  }708  point(x, y) {709    x = +x, y = +y;710    switch (this._point) {711      case 0: {712        this._point = 1;713        if (this._line) this._context.lineTo(x, y);714        else this._context.moveTo(x, y);715        break;716      }717      case 1: this._point = 2; // falls through718      default: {719        if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);720        else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);721        break;722      }723    }724    this._x0 = x, this._y0 = y;725  }726}727 728class BumpRadial {729  constructor(context) {730    this._context = context;731  }732  lineStart() {733    this._point = 0;734  }735  lineEnd() {}736  point(x, y) {737    x = +x, y = +y;738    if (this._point === 0) {739      this._point = 1;740    } else {741      const p0 = pointRadial(this._x0, this._y0);742      const p1 = pointRadial(this._x0, this._y0 = (this._y0 + y) / 2);743      const p2 = pointRadial(x, this._y0);744      const p3 = pointRadial(x, y);745      this._context.moveTo(...p0);746      this._context.bezierCurveTo(...p1, ...p2, ...p3);747    }748    this._x0 = x, this._y0 = y;749  }750}751 752function bumpX(context) {753  return new Bump(context, true);754}755 756function bumpY(context) {757  return new Bump(context, false);758}759 760function bumpRadial(context) {761  return new BumpRadial(context);762}763 764function linkSource(d) {765  return d.source;766}767 768function linkTarget(d) {769  return d.target;770}771 772function link(curve) {773  let source = linkSource,774      target = linkTarget,775      x$1 = x,776      y$1 = y,777      context = null,778      output = null,779      path = withPath(link);780 781  function link() {782    let buffer;783    const argv = slice.call(arguments);784    const s = source.apply(this, argv);785    const t = target.apply(this, argv);786    if (context == null) output = curve(buffer = path());787    output.lineStart();788    argv[0] = s, output.point(+x$1.apply(this, argv), +y$1.apply(this, argv));789    argv[0] = t, output.point(+x$1.apply(this, argv), +y$1.apply(this, argv));790    output.lineEnd();791    if (buffer) return output = null, buffer + "" || null;792  }793 794  link.source = function(_) {795    return arguments.length ? (source = _, link) : source;796  };797 798  link.target = function(_) {799    return arguments.length ? (target = _, link) : target;800  };801 802  link.x = function(_) {803    return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), link) : x$1;804  };805 806  link.y = function(_) {807    return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), link) : y$1;808  };809 810  link.context = function(_) {811    return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), link) : context;812  };813 814  return link;815}816 817function linkHorizontal() {818  return link(bumpX);819}820 821function linkVertical() {822  return link(bumpY);823}824 825function linkRadial() {826  const l = link(bumpRadial);827  l.angle = l.x, delete l.x;828  l.radius = l.y, delete l.y;829  return l;830}831 832const sqrt3$2 = sqrt(3);833 834var asterisk = {835  draw(context, size) {836    const r = sqrt(size + min(size / 28, 0.75)) * 0.59436;837    const t = r / 2;838    const u = t * sqrt3$2;839    context.moveTo(0, r);840    context.lineTo(0, -r);841    context.moveTo(-u, -t);842    context.lineTo(u, t);843    context.moveTo(-u, t);844    context.lineTo(u, -t);845  }846};847 848var circle = {849  draw(context, size) {850    const r = sqrt(size / pi);851    context.moveTo(r, 0);852    context.arc(0, 0, r, 0, tau);853  }854};855 856var cross = {857  draw(context, size) {858    const r = sqrt(size / 5) / 2;859    context.moveTo(-3 * r, -r);860    context.lineTo(-r, -r);861    context.lineTo(-r, -3 * r);862    context.lineTo(r, -3 * r);863    context.lineTo(r, -r);864    context.lineTo(3 * r, -r);865    context.lineTo(3 * r, r);866    context.lineTo(r, r);867    context.lineTo(r, 3 * r);868    context.lineTo(-r, 3 * r);869    context.lineTo(-r, r);870    context.lineTo(-3 * r, r);871    context.closePath();872  }873};874 875const tan30 = sqrt(1 / 3);876const tan30_2 = tan30 * 2;877 878var diamond = {879  draw(context, size) {880    const y = sqrt(size / tan30_2);881    const x = y * tan30;882    context.moveTo(0, -y);883    context.lineTo(x, 0);884    context.lineTo(0, y);885    context.lineTo(-x, 0);886    context.closePath();887  }888};889 890var diamond2 = {891  draw(context, size) {892    const r = sqrt(size) * 0.62625;893    context.moveTo(0, -r);894    context.lineTo(r, 0);895    context.lineTo(0, r);896    context.lineTo(-r, 0);897    context.closePath();898  }899};900 901var plus = {902  draw(context, size) {903    const r = sqrt(size - min(size / 7, 2)) * 0.87559;904    context.moveTo(-r, 0);905    context.lineTo(r, 0);906    context.moveTo(0, r);907    context.lineTo(0, -r);908  }909};910 911var square = {912  draw(context, size) {913    const w = sqrt(size);914    const x = -w / 2;915    context.rect(x, x, w, w);916  }917};918 919var square2 = {920  draw(context, size) {921    const r = sqrt(size) * 0.4431;922    context.moveTo(r, r);923    context.lineTo(r, -r);924    context.lineTo(-r, -r);925    context.lineTo(-r, r);926    context.closePath();927  }928};929 930const ka = 0.89081309152928522810;931const kr = sin(pi / 10) / sin(7 * pi / 10);932const kx = sin(tau / 10) * kr;933const ky = -cos(tau / 10) * kr;934 935var star = {936  draw(context, size) {937    const r = sqrt(size * ka);938    const x = kx * r;939    const y = ky * r;940    context.moveTo(0, -r);941    context.lineTo(x, y);942    for (let i = 1; i < 5; ++i) {943      const a = tau * i / 5;944      const c = cos(a);945      const s = sin(a);946      context.lineTo(s * r, -c * r);947      context.lineTo(c * x - s * y, s * x + c * y);948    }949    context.closePath();950  }951};952 953const sqrt3$1 = sqrt(3);954 955var triangle = {956  draw(context, size) {957    const y = -sqrt(size / (sqrt3$1 * 3));958    context.moveTo(0, y * 2);959    context.lineTo(-sqrt3$1 * y, -y);960    context.lineTo(sqrt3$1 * y, -y);961    context.closePath();962  }963};964 965const sqrt3 = sqrt(3);966 967var triangle2 = {968  draw(context, size) {969    const s = sqrt(size) * 0.6824;970    const t = s  / 2;971    const u = (s * sqrt3) / 2; // cos(Math.PI / 6)972    context.moveTo(0, -s);973    context.lineTo(u, t);974    context.lineTo(-u, t);975    context.closePath();976  }977};978 979const c = -0.5;980const s = sqrt(3) / 2;981const k = 1 / sqrt(12);982const a = (k / 2 + 1) * 3;983 984var wye = {985  draw(context, size) {986    const r = sqrt(size / a);987    const x0 = r / 2, y0 = r * k;988    const x1 = x0, y1 = r * k + r;989    const x2 = -x1, y2 = y1;990    context.moveTo(x0, y0);991    context.lineTo(x1, y1);992    context.lineTo(x2, y2);993    context.lineTo(c * x0 - s * y0, s * x0 + c * y0);994    context.lineTo(c * x1 - s * y1, s * x1 + c * y1);995    context.lineTo(c * x2 - s * y2, s * x2 + c * y2);996    context.lineTo(c * x0 + s * y0, c * y0 - s * x0);997    context.lineTo(c * x1 + s * y1, c * y1 - s * x1);998    context.lineTo(c * x2 + s * y2, c * y2 - s * x2);999    context.closePath();1000  }1001};1002 1003var times = {1004  draw(context, size) {1005    const r = sqrt(size - min(size / 6, 1.7)) * 0.6189;1006    context.moveTo(-r, -r);1007    context.lineTo(r, r);1008    context.moveTo(-r, r);1009    context.lineTo(r, -r);1010  }1011};1012 1013// These symbols are designed to be filled.1014const symbolsFill = [1015  circle,1016  cross,1017  diamond,1018  square,1019  star,1020  triangle,1021  wye1022];1023 1024// These symbols are designed to be stroked (with a width of 1.5px and round caps).1025const symbolsStroke = [1026  circle,1027  plus,1028  times,1029  triangle2,1030  asterisk,1031  square2,1032  diamond21033];1034 1035function Symbol(type, size) {1036  let context = null,1037      path = withPath(symbol);1038 1039  type = typeof type === "function" ? type : constant(type || circle);1040  size = typeof size === "function" ? size : constant(size === undefined ? 64 : +size);1041 1042  function symbol() {1043    let buffer;1044    if (!context) context = buffer = path();1045    type.apply(this, arguments).draw(context, +size.apply(this, arguments));1046    if (buffer) return context = null, buffer + "" || null;1047  }1048 1049  symbol.type = function(_) {1050    return arguments.length ? (type = typeof _ === "function" ? _ : constant(_), symbol) : type;1051  };1052 1053  symbol.size = function(_) {1054    return arguments.length ? (size = typeof _ === "function" ? _ : constant(+_), symbol) : size;1055  };1056 1057  symbol.context = function(_) {1058    return arguments.length ? (context = _ == null ? null : _, symbol) : context;1059  };1060 1061  return symbol;1062}1063 1064function noop() {}1065 1066function point$3(that, x, y) {1067  that._context.bezierCurveTo(1068    (2 * that._x0 + that._x1) / 3,1069    (2 * that._y0 + that._y1) / 3,1070    (that._x0 + 2 * that._x1) / 3,1071    (that._y0 + 2 * that._y1) / 3,1072    (that._x0 + 4 * that._x1 + x) / 6,1073    (that._y0 + 4 * that._y1 + y) / 61074  );1075}1076 1077function Basis(context) {1078  this._context = context;1079}1080 1081Basis.prototype = {1082  areaStart: function() {1083    this._line = 0;1084  },1085  areaEnd: function() {1086    this._line = NaN;1087  },1088  lineStart: function() {1089    this._x0 = this._x1 =1090    this._y0 = this._y1 = NaN;1091    this._point = 0;1092  },1093  lineEnd: function() {1094    switch (this._point) {1095      case 3: point$3(this, this._x1, this._y1); // falls through1096      case 2: this._context.lineTo(this._x1, this._y1); break;1097    }1098    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();1099    this._line = 1 - this._line;1100  },1101  point: function(x, y) {1102    x = +x, y = +y;1103    switch (this._point) {1104      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;1105      case 1: this._point = 2; break;1106      case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // falls through1107      default: point$3(this, x, y); break;1108    }1109    this._x0 = this._x1, this._x1 = x;1110    this._y0 = this._y1, this._y1 = y;1111  }1112};1113 1114function basis(context) {1115  return new Basis(context);1116}1117 1118function BasisClosed(context) {1119  this._context = context;1120}1121 1122BasisClosed.prototype = {1123  areaStart: noop,1124  areaEnd: noop,1125  lineStart: function() {1126    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =1127    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;1128    this._point = 0;1129  },1130  lineEnd: function() {1131    switch (this._point) {1132      case 1: {1133        this._context.moveTo(this._x2, this._y2);1134        this._context.closePath();1135        break;1136      }1137      case 2: {1138        this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);1139        this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);1140        this._context.closePath();1141        break;1142      }1143      case 3: {1144        this.point(this._x2, this._y2);1145        this.point(this._x3, this._y3);1146        this.point(this._x4, this._y4);1147        break;1148      }1149    }1150  },1151  point: function(x, y) {1152    x = +x, y = +y;1153    switch (this._point) {1154      case 0: this._point = 1; this._x2 = x, this._y2 = y; break;1155      case 1: this._point = 2; this._x3 = x, this._y3 = y; break;1156      case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;1157      default: point$3(this, x, y); break;1158    }1159    this._x0 = this._x1, this._x1 = x;1160    this._y0 = this._y1, this._y1 = y;1161  }1162};1163 1164function basisClosed(context) {1165  return new BasisClosed(context);1166}1167 1168function BasisOpen(context) {1169  this._context = context;1170}1171 1172BasisOpen.prototype = {1173  areaStart: function() {1174    this._line = 0;1175  },1176  areaEnd: function() {1177    this._line = NaN;1178  },1179  lineStart: function() {1180    this._x0 = this._x1 =1181    this._y0 = this._y1 = NaN;1182    this._point = 0;1183  },1184  lineEnd: function() {1185    if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();1186    this._line = 1 - this._line;1187  },1188  point: function(x, y) {1189    x = +x, y = +y;1190    switch (this._point) {1191      case 0: this._point = 1; break;1192      case 1: this._point = 2; break;1193      case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;1194      case 3: this._point = 4; // falls through1195      default: point$3(this, x, y); break;1196    }1197    this._x0 = this._x1, this._x1 = x;1198    this._y0 = this._y1, this._y1 = y;1199  }1200};

Showing the first 1,200 of 2142 lines. Download the file for the rest.

Brunobkr/llama.cpp_AlgMor24_github · Team Ai