Documentation ¶
Index ¶
- Constants
- Variables
- func Dur(x Date, y Date) int
- func ErrPos(s string, pos int) string
- func GetFileList(root string, suffix string) (paths []string, err error)
- func GetFileName(s string) string
- func GetOutPath(s string) string
- func GetPaths(s string) string
- func GetRedisClient() *redis.Client
- func GetUUID() string
- func Hide(filename string) error
- func InitializePath(path string)
- func IsDir(path string) bool
- func LoadCsv[T any](fileName string, row T) []*T
- func MapContainsValue[K, V comparable](m map[K]V, value V) bool
- func MapUniqValues[T comparable](m map[string]T) []T
- func MergeStringSlices(slices ...[]string) []string
- func ParseCsvMap(filename string) (map[string][]string, error)
- func PivotFloat64(data any, tags []string, fieldsToSum []string) map[string]map[string]float64
- func ReadConfig(c *viper.Viper)
- func ReadProdSpecs(filePath string) ([]string, map[string][]string)
- func ReleaseVault(fs *embed.FS) (path string)
- func RemoveDup(this []*float64) []*float64
- func ReplaceWholeWord(originalString string, oldWord string, newWord string) string
- func SCA(A [][]float64, b []float64, δ float64) (x []float64, i int, err error)
- func SCAKKT(A [][]float64, b []float64, ε float64) ([]float64, int, error)
- func SCALimit(A [][]float64, b []float64, limit int) ([]float64, int, error)
- func SetLogOutput()
- func StringExists(s []string, t string) bool
- func ValidLicense(vaultPath string) bool
- func WriteCsv(start, end Date, res ProjResult)
- type Date
- type FormulaParserRun
- type FsCloner
- type Parser
- type ProjResult
- type Token
- type User
Constants ¶
const ( Identifier = iota // e.g. 50 Literal // e.g. + - * / Operator // , COMMA )
const ExpDate = "12/31/2024"
const LicFile = "lic.json"
Variables ¶
var Conf *viper.Viper
var Limit int = 1e7
Limit is an absolute limit on number of iterations.
Functions ¶
func GetFileName ¶
func GetOutPath ¶
func GetRedisClient ¶
func GetRedisClient() *redis.Client
func InitializePath ¶
func InitializePath(path string)
func MapContainsValue ¶
func MapContainsValue[K, V comparable](m map[K]V, value V) bool
func MapUniqValues ¶
func MapUniqValues[T comparable](m map[string]T) []T
func MergeStringSlices ¶
func PivotFloat64 ¶
func ReadConfig ¶
func ReleaseVault ¶
func ReplaceWholeWord ¶
func SCA ¶
SCA solves the non-negative least squares problem.
Argument A represents a design or input matrix. Each element of A must have the same length. b represents a measurement or output vector. δ is a tolerance for the result.
Iteration will stop when the least squares objective is within δ of an optimal solution.
The result x returns coefficients of the fitted linear function, it will have the same length as elements of A. Result i is the number of iterations performed. An error is returned if A and b are not the same length.
func SCAKKT ¶
SCAKKT solves the non-negative least squares problem.
Argument A represents a design or input matrix. Each element of A must have the same length. b represents a measurement or output vector. ε is a tolerance for stopping iteration.
Stopping criteria for this function are based on Karush–Kuhn–Tucker conditions (see https://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions). Iteration stops when a result is non-negative and the gradient of the objective function is within ε of KKT conditions. The advantage of this function over SCA is that stopping conditions are simpler to compute and so each iteration takes less time. The disadvantage is that the ε of this function is less obviously related to the objective function and stopping criteria are less clear.
The result x returns coefficients of the fitted linear function, it will have the same length as elements of A. Result i is the number of iterations performed. An error is returned if A and b are not the same length.
func SCALimit ¶
SCALimit solves the non-negative least squares problem.
Argument A represents a design or input matrix. Each element of A must have the same length. b represents a measurement or output vector. limit is a maximum number of iterations.
Iteration will stops after limit iterations or when the result does not change from one iteration to the next. If argument limit is < 0, the package value Limit is used.
The result x returns coefficients of the fitted linear function, it will have the same length as elements of A. Result i is the number of iterations performed. An error is returned if A and b are not the same length.
func SetLogOutput ¶
func SetLogOutput()
func StringExists ¶
func ValidLicense ¶
func WriteCsv ¶
func WriteCsv(start, end Date, res ProjResult)
Types ¶
type FormulaParserRun ¶
func GetFormulaParserRuns ¶
func GetFormulaParserRuns() []FormulaParserRun
type FsCloner ¶
type FsCloner struct {
// contains filtered or unexported fields
}
embeded FS to release dll