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 ParseRanges(input string) ([]int, error)
- 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 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 ValidateFilePath ¶
ValidateFilePath checks if a file path is safe to use It prevents directory traversal attacks and ensures the path is clean
func ValidateOutputPath ¶
ValidateOutputPath ensures an output path is safe to write to
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.