FLImaging 6.5.8.1
KDTree.h
1#pragma once
2
11#include "TRect.h"
12
14namespace FLImaging
15{
17 namespace Base
18 {
19 template<typename T>
20 class CFLArray;
21
22 template<template<typename> class T1, typename T2>
23 class CInternalKDTree;
24
44 template<template<typename> class T1, typename T2>
45 class FL_EXPORT CKDTree : public CFLBase
46 {
47 public:
56
68 CKDTree(const CFLArray<T1<T2>>& flaVertices);
69
81 CKDTree(const CFLArray<T1<T2>>* pFlaVertices);
82
90 virtual ~CKDTree();
91
103 const CResult Clear();
104
120 const CResult Build(const CFLArray<T1<T2>>& flaVertices);
121
137 const CResult Build(const CFLArray<T1<T2>>* pFlaVertices);
138
150 int64_t GetCount() const;
151
165 const T1<T2>& GetNearestPoint(const T1<T2>& tpPoint) const;
166
180 size_t GetNearestIndex(const T1<T2>& tpPoint) const;
181
195 std::pair<T1<T2>, size_t> GetNearestPointAndIndex(const T1<T2>& tpPoint) const;
196
197
215 const CResult GetNearestNeighborsPoints(const T1<T2>& tpPoint, int32_t i32NearestNeighborsCount, CFLArray<T1<T2>>& flaResultPoints) const;
216
234 const CResult GetNearestNeighborsIndices(const T1<T2>& tpPoint, int32_t i32NearestNeighborsCount, CFLArray<uint64_t>& flaResultIndices) const;
235
253 const CResult GetNearestNeighborsIndices(const T1<T2>& tpPoint, int32_t i32NearestNeighborsCount, CFLArray<uint32_t>& flaResultIndices) const;
254
274 const CResult GetNearestNeighborsPointsAndIndices(const T1<T2>& tpPoint, int32_t i32NearestNeighborsCount, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint64_t>& flaResultIndices) const;
275
295 const CResult GetNearestNeighborsPointsAndIndices(const T1<T2>& tpPoint, int32_t i32NearestNeighborsCount, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint32_t>& flaResultIndices) const;
296
297
315 const CResult GetPointsInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<T1<T2>>& flaResultPoints) const;
316
334 const CResult GetIndicesInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<uint64_t>& flaResultIndices) const;
335
353 const CResult GetIndicesInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<uint32_t>& flaResultIndices) const;
354
374 const CResult GetPointsAndIndicesInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint64_t>& flaResultIndices) const;
375
395 const CResult GetPointsAndIndicesInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint32_t>& flaResultIndices) const;
396
397
398
399
417 const CResult GetPointsInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<T1<T2>>& flaResultPoints) const;
418
436 const CResult GetIndicesInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<uint64_t>& flaResultIndices) const;
437
455 const CResult GetIndicesInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<uint32_t>& flaResultIndices) const;
456
476 const CResult GetPointsAndIndicesInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint64_t>& flaResultIndices) const;
477
497 const CResult GetPointsAndIndicesInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint32_t>& flaResultIndices) const;
498
499
500
501
502
516 const CResult OperateAdd(const T1<T2>& tpVector);
517
531 const CResult OperateMultiply(const T1<T2>& tpVector);
532
533 DeclareGetClassType();
534
535
536 protected:
537
538 CInternalKDTree<T1, T2>* m_pInternal;
539
540 friend class CInternalKDTree<T1, T2>;
541 };
542 }
543}
Template type 의 배열 클래스.
Definition RangeTree.h:19
FLImaging의 최상위 기저 클래스
Definition FLBase.h:36
KDTree 클래스. K 차원의 이진 탐색 트리.
Definition KDTree.h:46
const CResult GetNearestNeighborsPointsAndIndices(const T1< T2 > &tpPoint, int32_t i32NearestNeighborsCount, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint64_t > &flaResultIndices) const
입력된 정점에서 가장 가까운 정점을 탐색한 뒤 찾은 정점 좌표와 정점 인덱스를 지정된 개수만큼 반환한다.
int64_t GetCount() const
구축된 데이터의 원소 개수를 얻어옵니다
const CResult GetIndicesInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< uint32_t > &flaResultIndices) const
입력된 범위에 포함되는 정점을 탐색한 뒤 찾은 정점 인덱스를 반환한다.
const CResult Build(const CFLArray< T1< T2 > > &flaVertices)
데이터 구축
const CResult GetPointsAndIndicesInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint32_t > &flaResultIndices) const
입력된 범위에 포함되는 정점을 탐색한 뒤 찾은 정점 좌표와 정점 인덱스를 지정된 개수만큼 반환한다.
virtual ~CKDTree()
소멸자
const CResult Build(const CFLArray< T1< T2 > > *pFlaVertices)
데이터 구축
std::pair< T1< T2 >, size_t > GetNearestPointAndIndex(const T1< T2 > &tpPoint) const
입력된 정점에서 가장 가까운 정점을 탐색한 뒤 찾은 정점 좌표와 인덱스를 반환한다.
const CResult OperateMultiply(const T1< T2 > &tpVector)
모든 노드에 입력된 벡터를 원소별로 곱합니다.
const CResult GetNearestNeighborsIndices(const T1< T2 > &tpPoint, int32_t i32NearestNeighborsCount, CFLArray< uint32_t > &flaResultIndices) const
입력된 정점에서 가장 가까운 정점을 탐색한 뒤 찾은 정점 인덱스를 반환한다.
const CResult GetPointsInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< T1< T2 > > &flaResultPoints) const
입력된 범위에 포함되는 정점을 탐색한 뒤 찾은 정점 좌표를 반환한다.
const T1< T2 > & GetNearestPoint(const T1< T2 > &tpPoint) const
입력된 정점에서 가장 가까운 정점을 탐색한 뒤 찾은 정점 좌표를 반환한다.
const CResult GetNearestNeighborsIndices(const T1< T2 > &tpPoint, int32_t i32NearestNeighborsCount, CFLArray< uint64_t > &flaResultIndices) const
입력된 정점에서 가장 가까운 정점을 탐색한 뒤 찾은 정점 인덱스를 반환한다.
size_t GetNearestIndex(const T1< T2 > &tpPoint) const
입력된 정점에서 가장 가까운 정점을 탐색한 뒤 찾은 정점 인덱스를 반환한다.
const CResult GetPointsAndIndicesInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint64_t > &flaResultIndices) const
입력된 범위에 포함되는 정점을 탐색한 뒤 찾은 정점 좌표와 정점 인덱스를 지정된 개수만큼 반환한다.
const CResult GetNearestNeighborsPointsAndIndices(const T1< T2 > &tpPoint, int32_t i32NearestNeighborsCount, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint32_t > &flaResultIndices) const
입력된 정점에서 가장 가까운 정점을 탐색한 뒤 찾은 정점 좌표와 정점 인덱스를 지정된 개수만큼 반환한다.
const CResult GetIndicesInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< uint64_t > &flaResultIndices) const
입력된 범위에 포함되는 정점을 탐색한 뒤 찾은 정점 인덱스를 반환한다.
const CResult GetIndicesInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< uint64_t > &flaResultIndices) const
입력된 반경에 포함되는 정점을 탐색한 뒤 찾은 정점 인덱스를 반환한다.
const CResult OperateAdd(const T1< T2 > &tpVector)
모든 노드에 입력된 벡터를 더합니다.
const CResult GetIndicesInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< uint32_t > &flaResultIndices) const
입력된 반경에 포함되는 정점을 탐색한 뒤 찾은 정점 인덱스를 반환한다.
const CResult GetPointsInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< T1< T2 > > &flaResultPoints) const
입력된 반경에 포함되는 정점을 탐색한 뒤 찾은 정점 좌표를 반환한다.
CKDTree(const CFLArray< T1< T2 > > &flaVertices)
생성자
CKDTree(const CFLArray< T1< T2 > > *pFlaVertices)
생성자
const CResult GetPointsAndIndicesInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint64_t > &flaResultIndices) const
입력된 반경에 포함되는 정점을 탐색한 뒤 찾은 정점 좌표와 정점 인덱스를 지정된 개수만큼 반환한다.
const CResult GetPointsAndIndicesInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint32_t > &flaResultIndices) const
입력된 반경에 포함되는 정점을 탐색한 뒤 찾은 정점 좌표와 정점 인덱스를 지정된 개수만큼 반환한다.
const CResult GetNearestNeighborsPoints(const T1< T2 > &tpPoint, int32_t i32NearestNeighborsCount, CFLArray< T1< T2 > > &flaResultPoints) const
입력된 정점에서 가장 가까운 정점을 탐색한 뒤 찾은 정점 좌표를 반환한다.
const CResult Clear()
데이터 비우기
FLImaging 모듈의 수행 결과 객체
Definition ResultsDef.h:1514