Documentation
¶
Index ¶
- func DenseToMatrix(d *mat.Dense) types.Matrix
- func FilterMatrix(data [][]float64, excludedRows, excludedColumns []int) ([][]float64, error)
- func FilterStringSlice(items []string, excludedIndices []int) ([]string, error)
- func MatrixToDense(m types.Matrix) *mat.Dense
- func MatrixToSlice(m *mat.Dense) [][]float64
- func MinInt(a, b int) int
- func ParseRanges(input string) ([]int, error)
- func SliceToMatrix(data [][]float64) *mat.Dense
- func ValidateFilePath(path string) error
- func ValidateOutputPath(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DenseToMatrix ¶
DenseToMatrix converts a gonum Dense matrix to types.Matrix
func FilterMatrix ¶
FilterMatrix removes specified rows and columns from a matrix
func FilterStringSlice ¶
FilterStringSlice removes elements at specified indices from a string slice
func MatrixToDense ¶
MatrixToDense converts a types.Matrix to a gonum Dense matrix
func MatrixToSlice ¶ added in v1.1.0
MatrixToSlice converts a gonum Dense matrix to [][]float64
func ParseRanges ¶
ParseRanges parses a comma-separated string of indices and ranges into a slice of integers. Examples:
- "1,3,5" returns [1, 3, 5]
- "1-3,5" returns [1, 2, 3, 5]
- "1,3-5,7" returns [1, 3, 4, 5, 7]
Note: Input indices are 1-based (human-friendly), output indices are 0-based
func SliceToMatrix ¶ added in v1.1.0
SliceToMatrix converts a [][]float64 to a gonum Dense matrix
func ValidateFilePath ¶
ValidateFilePath checks if a file path is safe to use It prevents directory traversal attacks and ensures the path is clean This function now delegates to the enhanced security module
func ValidateOutputPath ¶
ValidateOutputPath ensures an output path is safe to write to This function now delegates to the enhanced security module which includes comprehensive checks for system directories, path traversal, and write permissions
Types ¶
This section is empty.