Documentation
¶
Index ¶
- Variables
- func ExpressionVerify(expr string) error
- func FreeExprtk(obj GoExprtk)
- func IsLetterOrDigit(c byte) bool
- func Version() string
- type GoExprtk
- func (obj GoExprtk) AddDoubleVariable(x string, val float64)
- func (obj *GoExprtk) AddFunction(funName string, cFun unsafe.Pointer, argNum int)
- func (obj GoExprtk) AddStringVariable(varName string, val string)
- func (obj GoExprtk) AddVectorVariable(x string, val []float64)
- func (obj *GoExprtk) CompileExpression() error
- func (obj *GoExprtk) Free()
- func (obj GoExprtk) GetEvaluatedValue() float64
- func (obj *GoExprtk) GetVariableList() []string
- func (obj *GoExprtk) SetExpression(expr string)
- func (obj GoExprtk) UpdateDoubleVariableValue(varName string, val float64)
- func (obj GoExprtk) UpdateStringVariableValue(varName string, val string)
- func (obj GoExprtk) UpdateVectorVariableValue(varName string, val []float64)
Constants ¶
This section is empty.
Variables ¶
View Source
var ReservedList = []string{"if", "else", "for", "break", "and", "true", "abs", "var",
"max", "min", "sum", "acos", "acosh", "asin", "asinh", "atan",
"atanh", "atan2", "avg", "case", "ceil", "clamp", "mod",
"continue", "cos", "cosh", "cot", "csc", "default",
"deg2grad", "deg2rad", "equal", "erf", "erfc", "exp",
"expm1", "false", "floor", "frac", "grad2deg", "nand",
"hypot", "iclamp", "ilike", "in", "inrange", "mor", "nor",
"like", "log10", "log1p", "mand", "mul", "ncdf", "log2",
"not", "not_equal", "null", "or", "pow", "rad2deg", "logn",
"repeat", "return", "root", "round", "roundn", "sec", "sgn",
"shl", "shr", "sin", "sinc", "sinh", "sqrt", "swap",
"switch", "tan", "tanh", "trunc", "until", "log",
"while", "xnor", "xor", "&", "|",
"x_sum", "x_avg", "x_min", "x_max", "x_first", "x_last", "x_dev", "x_diff", "x_wavg"}
Functions ¶
Types ¶
type GoExprtk ¶
type GoExprtk struct {
// contains filtered or unexported fields
}
GoExprtk ...Exprtk Structure
func NewExprtk ¶
func NewExprtk() GoExprtk
NewExprtk ... Creates a new object 调用完后请使用FreeExprtk、Free释放内存
func (GoExprtk) AddDoubleVariable ¶
AddDoubleVariable ... Adds variable to the expression
func (*GoExprtk) AddFunction ¶
添加自定义函数
func (GoExprtk) AddStringVariable ¶
AddStringVariable ... Adds variable to the expression
func (GoExprtk) AddVectorVariable ¶
AddVectorVariable ... Adds variable to the expression
func (*GoExprtk) CompileExpression ¶
CompileExpression ... Compiles the Expression
func (GoExprtk) GetEvaluatedValue ¶
GetEvaluatedValue ... Returns the evaluated value
func (*GoExprtk) SetExpression ¶
设置表达式 请通过GetVariableList()获取自动注册的变量列表
func (GoExprtk) UpdateDoubleVariableValue ¶
SetDoubleVariableValue ... Sets value to the variable
func (GoExprtk) UpdateStringVariableValue ¶
SetStringVariableValue ... Sets value to the variable
func (GoExprtk) UpdateVectorVariableValue ¶
SetVectorVariableValue ... Sets value to the variable
Click to show internal directories.
Click to hide internal directories.