示例#1
0
func OneNorm(x Const) float64 {
	return vec.Sum(Abs(x))
}
示例#2
0
func LpNorm(x Const, p float64) float64 {
	return math.Pow(vec.Sum(vec.Pow(Abs(x), p)), 1/p)
}
示例#3
0
func SqrNorm(x Const) float64 {
	return vec.Sum(vec.Square(Abs(x)))
}