27 lines
698 B
C#
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; }
|
|
} |