I have written my own struct for interval arithmetic, to keep it simple let's just say this is a value defined by a lower and an upper bound. Some of you might know be familiar with the type Range, which is quite similar.
I overloaded the whole arithmetic operators like +,-,*,/,<,>, ... . So I suppose I should have something like a generic type (or should be able to implement the rest to make it one).
Now I want to work/calculate with my type. Since I am handling Linear Equation Systems, need stuff like SVD and don't want to newly invent the wheel, I am planning to use existing Math libraries like Math.NET Numerics. But this is what their matrix class says:
/// <summary>
/// Defines the base class for <c>Matrix</c> classes.
/// </summary>
/// <typeparam name="T">Supported data types are <c>double</c>, <c>single</c>, <see cref="Complex"/>, and <see cref="Complex32"/>.</typeparam>
[Serializable]
public abstract partial class Matrix<T> :
IFormattable, IEquatable<Matrix<T>>
#if !PORTABLE
, ICloneable
#endif
where T : struct, IEquatable<T>, IFormattable
In short: They say only double, single and complex are allowed. So my generic type won't work, even if it implements all the listed interfaces, right?
So: Am I right that I can't use Math.Net Numerics with my type? Do you know other math libraries that would support my type/a generic? Do I really have to write my own implementations?
Thanks in advance!