This repository has been archived on 2024-06-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-01-08 16:23:24 +01:00

27 lines
698 B
C#

using System.Collections;
namespace Common.Distance;
public interface IDistanceComparer
{
/// <summary>
/// The calculated absolute distance between
/// <see cref="IDistanceComparer{T}.Reference"/> and
/// <see cref="IDistanceComparer{T}.Hypothesis"/>
/// </summary>
public double Distance { get; }
}
public interface IDistanceComparer<out T> : IDistanceComparer
where T : IEnumerable
{
/// <summary>
/// The comparison reference, meaning the "known to be correct" value
/// </summary>
public T Reference { get; }
/// <summary>
/// The value hypothesis, whose correctness is checked against <see cref="Reference"/>
/// </summary>
public T? Hypothesis { get; }
}