Beispiel #1
0
 public ManualMatchedPair(ManualMatchViewModel <TInternal, TExternal> model, ManualMatchItem <TInternal> _internal, ManualMatchItem <TExternal> _external)
 {
     Internal   = _internal;
     External   = _external;
     this.model = model;
     Detach     = new RelayCommand(() => model.BreakMatch(this));
     Distance   = LevensteinDistance.RelativeDistance(Internal.Name, External.Name);
 }
Beispiel #2
0
        void MakeMatrix()
        {
            matrix = new double[internals.Length, externals.Length];
            for (int i = 0; i < internals.Length; i++)
            {
                for (int j = 0; j < externals.Length; j++)
                {
                    var dst = LevensteinDistance.RelativeDistance(
                        internalSelector(internals[i]),
                        externalSelector(externals[j]));

                    matrix[i, j] = dst;
                }
            }
        }