Files

37 lines
1.2 KiB
Go
Raw Permalink Normal View History

2026-09-03 10:00:00 +02:00
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (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)
}