Documentation
¶
Index ¶
- Variables
- func CompareAny(a, b any) int
- func GetTypeSortingRank(v any) int
- func HermiteInterpolation(data []float64, derivatives []float64, x float64) (float64, error)
- func LagrangeInterpolation(data []float64, x float64) (float64, error)
- func LinearInterpolation(data []float64, x float64) (float64, error)
- func NearestNeighborInterpolation(data []float64, x float64) (float64, error)
- func NewtonInterpolation(data []float64, x float64) (float64, error)
- func ParallelMergeStable[S ~[]E, E any](x S, cmp func(E, E) int, numChunks int)
- func ParallelSortStableFunc[S ~[]E, E any](x S, cmp func(E, E) int)
- func QuadraticInterpolation(data []float64, x float64) (float64, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CompareAny ¶
CompareAny compares two values of any type and returns: -1 if a < b
0 if a == b 1 if a > b
It uses type ranking and type-specific comparison logic.
func GetTypeSortingRank ¶
GetTypeSortingRank returns the type rank for sorting mixed types. Lower rank means higher priority (comes first in ascending order).
func HermiteInterpolation ¶
func ParallelMergeStable ¶
ParallelMergeStable merges the sorted chunks in the slice x. It assumes x is divided into numChunks sorted sub-slices.
func ParallelSortStableFunc ¶
ParallelSortStableFunc sorts the slice x in ascending order as determined by the cmp function. It is a parallelized version of slices.SortStableFunc, using goroutines to improve performance on large datasets. The function maintains stability: equal elements preserve their original order. This optimized version uses adaptive goroutines scaling and improved chunking strategy.
Types ¶
This section is empty.