Are vectors and matrices reference or value types? Math.Net Numerics

147 Views Asked by At

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

There are 1 best solutions below

0
Guru Stron On BEST ANSWER

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