英文:
Are vectors and matrices reference or value types? Math.Net Numerics
问题
请原谅我的无知,向量和矩阵是引用类型还是值类型?不确定是否有区别,但我是指从数组创建的那些?
我尝试在网上快速查找,但找不到答案。
我在我的代码中尝试了一些东西,得出它们是引用类型的结论,但作为我这样的初学者,我想向专家确认一下。
英文:
Excuse my ignorance, but are vectors and matrices reference or value types? Not sure if that makes a difference, but I am referring to those created from an array?
I tried to look it up online quickly, but couldn't find the answer.
I tried a few things in my code that made me conclude they are reference types, but being the beginner I am, I wanted to confirm from the experts.
答案1
得分: 3
Math.NET Numerics的Vector
和Matrix
是引用类型:
public abstract partial class Vector<T> : IFormattable, IEquatable<Vector<T>>, IList, IList<T>, ICloneable
where T : struct, IEquatable<T>, IFormattable
public abstract partial class Matrix<T> : IFormattable, IEquatable<Matrix<T>>, ICloneable
where T : struct, IEquatable<T>, IFormattable
英文:
Math.NET Numerics Vector
and Matrix
are reference types:
public abstract partial class Vector<T> : IFormattable, IEquatable<Vector<T>>, IList, IList<T>, ICloneable
where T : struct, IEquatable<T>, IFormattable
public abstract partial class Matrix<T> : IFormattable, IEquatable<Matrix<T>>, ICloneable
where T : struct, IEquatable<T>, IFormattable
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论