区間の集合から任意の値が含まれる区間のみを高速に探索するためのクラス [詳細]
#include <interval_tree.h>
データ構造 | |
class | node |
Interval-treeのノードを表すクラス(interval_treeクラスの内部でのみ使用) [詳細] |
Public 型 | |
typedef S | section_type |
区間を表す型 | |
typedef S::min_max_type | min_max_type |
区間の両端の値を表す型 | |
typedef S::tag_type | tag_type |
区間のタグ情報をを表す型 | |
typedef V | value_type |
区間の探索の際に入力される値を表す型 |
Public メソッド | |
void | find (const value_type &val, std::vector< tag_type > &tags) |
入力された値が含まれる区間の探索 | |
bool | construct (const std::vector< section_type > &secs) |
Interval-treeの構築 | |
void | destruct () |
Interval-treeの破棄 | |
interval_tree () | |
デフォルトコンストラクタ | |
interval_tree (const std::vector< section_type > &secs) | |
コンストラクタ(Interval-treeの構築) | |
interval_tree (const interval_tree< section_type, value_type > &it) | |
コピーコンストラクタ | |
~interval_tree () | |
デストラクタ | |
interval_tree & | operator= (const interval_tree< section_type, value_type > &it) |
代入演算子 |
区間の集合から任意の値が含まれる区間のみを高速に探索するためのクラス
区間の集合から2分木を構築し、通常O(n)かかる探索時間をO(log n)に削減する. 線分や面分の重なり判定などに有効.
S | … 区間のデータ型( mist::tagged_section< M, T >型 ) |
V | … 区間の探索の際に入力する任意の値のデータ型( double や float など,mist::rgb< M, T >::min_max_typeと同じか、あるいはより精度の高い型 ) |
|
inline |
コンストラクタ(Interval-treeの構築)
[in] | secs | … 区間集合 |
|
inline |
コピーコンストラクタ
[in] | it | … interval_treeオブジェクト |
|
inline |
Interval-treeの構築
[in] | secs | … 区間の集合 |
参照元 interval_tree< section_type, float_type >::interval_tree().
|
inline |
入力された値が含まれる区間の探索
[in] | val | … 入力(この値を間に含む区間を探索) |
[out] | tags | … 探索された区間のタグ情報の集合 |
|
inline |
代入演算子
[in] | it | … interval_treeオブジェクト |