// Copyright (c) 2026 Petr BalvĂ­n (https://petrbalvin.org) // SPDX-License-Identifier: MIT package core import ( "sourcedock.dev/petrbalvin/tensor/internal/base" ) // The bridge delegates to base wholesale: the error prefix, the shape // rendering and the range helper must not drift from what the domain // packages see, so no local copy of them exists here. // epsF is the float64 machine epsilon, bridged from base.EpsF. const epsF = base.EpsF // scalar is the element type the generic kernels serve. type scalar = base.Scalar func errf(format string, args ...any) error { return base.Errf(format, args...) } func shapeText(shape []int) string { return base.ShapeText(shape) } func rangeN(n int) []int { return base.RangeN(n) } func factor[T scalar](m [][]T) ([]int, int) { return base.Factor(m) } func checkSingular[T scalar](name string, m [][]T) error { return base.CheckSingular(name, m) } func solveColumn[T scalar](m [][]T, col []T) { base.SolveColumn(m, col) } func permuteColumn[T scalar](col []T, perm []int) { base.PermuteColumn(col, perm) } func solveSystem[T scalar](name string, m [][]T, rhs [][]T) ([][]T, error) { return base.SolveSystem(name, m, rhs) }