コード例 #1
0
ファイル: M2M_NN.cs プロジェクト: luosz/ai-algorithmplatform
        public IPosition NearestNeighbor(IPosition targetPoint)
        {
            NearestNeighbor_ByM2MStructure NN = new NearestNeighbor_ByM2MStructure(m2mStructure);

            if (GetQueryPosition != null)
            {
                NN.GetQueryPosition += GetQueryPosition;
            }

            if (GetQueryPart != null)
            {
                NN.GetQueryPart += GetQueryPart;
            }

            if (SearchOnePartBeginAndGetSearchPartSequence != null)
            {
                NN.SearchOnePartBeginAndGetSearchPartSequence += SearchOnePartBeginAndGetSearchPartSequence;
            }

            if (GetSearchPart != null)
            {
                NN.GetSearchPart += GetSearchPart;
            }

            if (GetComparedPoint != null)
            {
                NN.GetComparedPoint += GetComparedPoint;
            }

            if (CurrentNearestPointChanged != null)
            {
                NN.CurrentNearestPointChanged += CurrentNearestPointChanged;
            }

            if (SearchBoundChanged != null)
            {
                NN.SearchBoundChanged += SearchBoundChanged;
            }

            return(NN.NearestNeighbor(targetPoint));
        }
コード例 #2
0
ファイル: M2M_NN.cs プロジェクト: luosz/ai-algorithmplatform
        public IPosition ApproximateNearestNeighbor(IPosition targetPoint)
        {
            NearestNeighbor_ByM2MStructure NN = new NearestNeighbor_ByM2MStructure(m2mStructure);

            return(NN.ApproximateNearestNeighbor(targetPoint));
        }
コード例 #3
0
ファイル: M2M_NN.cs プロジェクト: luosz/ai-algorithmplatform
        public IPositionSet ApproximateKNearestNeighbor(IPosition targetPoint, int k)
        {
            NearestNeighbor_ByM2MStructure NN = new NearestNeighbor_ByM2MStructure(m2mStructure);

            return(NN.ApproximateSearchKNearestNeighbor(targetPoint, k));
        }