Projektstart

This commit is contained in:
2026-01-22 15:49:12 +01:00
parent 7212eb6f7a
commit 57e5f652f8
10637 changed files with 2598792 additions and 64 deletions

4
backend/node_modules/mnemonist/sort/insertion.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import {IArrayLike} from '../utils/types';
export function inplaceInsertionSort(array: IArrayLike, lo: number, hi: number): IArrayLike;
export function inplaceInsertionSortIndices(array: IArrayLike, indices: IArrayLike, lo: number, hi: number): IArrayLike;

50
backend/node_modules/mnemonist/sort/insertion.js generated vendored Normal file
View File

@@ -0,0 +1,50 @@
/**
* Mnemonist Insertion Sort
* =========================
*
* Insertion sort related functions.
*/
function inplaceInsertionSort(array, lo, hi) {
i = lo + 1;
var j, k;
for (; i < hi; i++) {
k = array[i];
j = i - 1;
while (j >= lo && array[j] > k) {
array[j + 1] = array[j];
j--;
}
array[j + 1] = k;
}
return array;
}
exports.inplaceInsertionSort = inplaceInsertionSort;
function inplaceInsertionSortIndices(array, indices, lo, hi) {
i = lo + 1;
var j, k, t;
for (; i < hi; i++) {
t = indices[i];
k = array[t];
j = i - 1;
while (j >= lo && array[indices[j]] > k) {
indices[j + 1] = indices[j];
j--;
}
indices[j + 1] = t;
}
return indices;
}
exports.inplaceInsertionSortIndices = inplaceInsertionSortIndices;

4
backend/node_modules/mnemonist/sort/quick.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import {IArrayLike} from '../utils/types';
export function inplaceQuickSort(array: IArrayLike, lo: number, hi: number): IArrayLike;
export function inplaceQuickSortIndices(array: IArrayLike, indices: IArrayLike, lo: number, hi: number): IArrayLike;

116
backend/node_modules/mnemonist/sort/quick.js generated vendored Normal file
View File

@@ -0,0 +1,116 @@
/**
* Mnemonist Quick Sort
* =====================
*
* Quick sort related functions.
* Adapted from: https://alienryderflex.com/quicksort/
*/
var LOS = new Float64Array(64),
HIS = new Float64Array(64);
function inplaceQuickSort(array, lo, hi) {
var p, i, l, r, swap;
LOS[0] = lo;
HIS[0] = hi;
i = 0;
while (i >= 0) {
l = LOS[i];
r = HIS[i] - 1;
if (l < r) {
p = array[l];
while (l < r) {
while (array[r] >= p && l < r)
r--;
if (l < r)
array[l++] = array[r];
while (array[l] <= p && l < r)
l++;
if (l < r)
array[r--] = array[l];
}
array[l] = p;
LOS[i + 1] = l + 1;
HIS[i + 1] = HIS[i];
HIS[i++] = l;
if (HIS[i] - LOS[i] > HIS[i - 1] - LOS[i - 1]) {
swap = LOS[i];
LOS[i] = LOS[i - 1];
LOS[i - 1] = swap;
swap = HIS[i];
HIS[i] = HIS[i - 1];
HIS[i - 1] = swap;
}
}
else {
i--;
}
}
return array;
}
exports.inplaceQuickSort = inplaceQuickSort;
function inplaceQuickSortIndices(array, indices, lo, hi) {
var p, i, l, r, t, swap;
LOS[0] = lo;
HIS[0] = hi;
i = 0;
while (i >= 0) {
l = LOS[i];
r = HIS[i] - 1;
if (l < r) {
t = indices[l];
p = array[t];
while (l < r) {
while (array[indices[r]] >= p && l < r)
r--;
if (l < r)
indices[l++] = indices[r];
while (array[indices[l]] <= p && l < r)
l++;
if (l < r)
indices[r--] = indices[l];
}
indices[l] = t;
LOS[i + 1] = l + 1;
HIS[i + 1] = HIS[i];
HIS[i++] = l;
if (HIS[i] - LOS[i] > HIS[i - 1] - LOS[i - 1]) {
swap = LOS[i];
LOS[i] = LOS[i - 1];
LOS[i - 1] = swap;
swap = HIS[i];
HIS[i] = HIS[i - 1];
HIS[i - 1] = swap;
}
}
else {
i--;
}
}
return indices;
}
exports.inplaceQuickSortIndices = inplaceQuickSortIndices;