我应该如何命名代表向量分量之和的变量?
有有效的数学术语吗? 我可以将这个家伙命名为“sumXY”,但这是(a)蹩脚的,(b)不可扩展的,因为上升一个维度需要重命名。
在打字时我想到了“componentSum”,但我很想知道它是否有真正的名字。
Is there a valid math term? I could just name this guy "sumXY", but that is (a) lame, and (b) not scalable, since going up a dimension would require a rename.
While typing I thought of "componentSum", but I'd love to know if there's a real name for it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您取绝对值的总和,则称为 L1 范数 (勒贝格 1 范数的缩写)。
如果您不采用绝对值,我建议将其称为总和,或者向量总和(正如其他人所建议的那样)。
编辑:
阅读各种评论后,我建议使用术语“元素总和”。 如果向量可以包含负值,并且在求和之前没有取元素的绝对值,则使用“距离”、“长度”或“范数”等术语是错误的。 所有这些都意味着在求和之前取每个元素的绝对值。
If you're taking the sum of the absolute values, it's called the L1 norm (short for Lebesgue 1 norm).
If you're not taking absolute values, I'd suggest just calling it sum, or perhaps vector sum (as others have suggested).
EDIT:
After reading various comments, I'd suggest using the term "element sum". If your vector can contain negative values and you're not taking the absolute value of the elements before summing, it's wrong to use terms like "distance", "length", or "norm". All of those imply one is taking the absolute value of each element before summing.
为什么不直接将其命名为向量Sum,其中向量是向量的名称。
Why not just name it vectorSum where vector is the name of the vector.
如果您的向量确实是物理意义上的向量,则几乎没有任何正当理由必须将各个分量相加。 所以我怀疑你正在使用的实际上是一个数字列表(即CS向量)而不是一个真正的(物理)向量,并且你不应该太担心命名。
'componentSum'
或'cSum'
或'sigma'
甚至...任何对您有意义的内容。If your vector is really a vector in the physical sense, there's pretty much no valid reason you would have to add up the components. So I suspect that what you're working with is really a list of numbers (i.e. a CS vector) rather than a true (physics) vector, and you shouldn't worry too much about the naming.
'componentSum'
or'cSum'
or'sigma'
even... whatever makes sense to you.