C#中的规范化(如何在C#中获得norm2) [英] normalization in c# (how to get norm2 in c#)

查看:263
本文介绍了C#中的规范化(如何在C#中获得norm2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
我需要知道在c#中是否直接有针对norm2和norm1的任何方法,因为您知道这些函数在矢量的数学运算中使用了……但是C#中是否有任何方法可以做到?

hi
I need to know if there is any method for norm2 and norm1 directly in c# , as you know these functions are used in math for vectors ... but is there any method in C# that can do so?

推荐答案

最新的.net框架4.5在Vector类中提供了一种Normalize()方法.
http://msdn.microsoft.com/en-us/library/system. windows.vector.normalize.aspx [ ^ ]
看看上面的链接.有一篇很好的文章介绍了向量和向量归一化的许多内容.
C#的矢量类型 [
The latest .net framework 4.5 provides a method Normalize() in Vector class.
http://msdn.microsoft.com/en-us/library/system.windows.vector.normalize.aspx[^]
Have a look on the above link. There is a nice article which explains many things about vectors and vector normalization.
A Vector Type for C#[^]

If you really want a method Normalize in the previous frameworks, then use the above link, understand it and create an extension method Normalize().

public static void Normalize(this Vector vectorObj,...)
{
    /// write the normalization logic here
}



希望您在找同样的东西.



I hope you were looking for the same.



试试这个链接
C#中列表的统计技巧:使用扩展方法进行缩放,标准化,规范化,排名等 [
Hi,
Try this link
Statistical Tricks for Lists in C#: Scaling, Standardizing, Normalizing, Ranking, and more with extension methods[^]


Math名称空间包含所有方法提供,例如Math.Round和Math.Floor.如果不存在,则不存在,您需要编写它.
The Math namespace has all the methods on offer, such as Math.Round and Math.Floor. If it''s not there, it''s not there, and you need to write it.


这篇关于C#中的规范化(如何在C#中获得norm2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆