Kyopro Library
 
読み取り中…
検索中…
一致する文字列を見つけられません
SortedTree< T > 構造体テンプレート

#include "sorted_tree.hpp"

SortedTree< T > の継承関係図

公開メンバ関数

 SortedTree ()=default
 
 SortedTree (T not_found=-1)
 コンストラクタ
 
min ()
 最小値を返す
 
max ()
 最大値を返す
 
pop_min ()
 最小値を返し、削除する
 
pop_max ()
 最大値を返し、削除する
 
bool contains (T x)
 x が含まれているか否かを返す
 
bool discard (T x)
 x を削除する
 
gt (T x)
 x より大きい最小の値を返す
 
ge (T x)
 x 以上最小の値を返す
 
lt (T x)
 x 未満最大の値を返す
 
le (T x)
 x 以下の最大の値を返す
 
int count_lt (T x)
 x より小さい値の個数を返す
 
int count_le (T x)
 x 以下の値の個数を返す
 
int count_gt (T x)
 x より大きい値の個数を返す
 
int count_ge (T x)
 x 以上の値の個数を返す
 
kth_min (int k)
 k(0-indexed) 番目に小さい値の個数を返す
 
kth_max (int k)
 k(0-indexed) 番目に大きい値の個数を返す
 

公開変数類

not_found =-1
 

詳解

template<typename T>
struct SortedTree< T >

sorted_tree.hpp7 行目に定義があります。

構築子と解体子

◆ SortedTree() [1/2]

template<typename T>
SortedTree< T >::SortedTree ( )
default

◆ SortedTree() [2/2]

template<typename T>
SortedTree< T >::SortedTree ( T not_found = -1)
inline

コンストラクタ

引数
not_found指定の値が見つからなかったときに返す値

sorted_tree.hpp14 行目に定義があります。

参照先 not_found.

関数詳解

◆ min()

template<typename T>
T SortedTree< T >::min ( )
inline

最小値を返す

sorted_tree.hpp17 行目に定義があります。

参照先 not_found.

◆ max()

template<typename T>
T SortedTree< T >::max ( )
inline

最大値を返す

sorted_tree.hpp23 行目に定義があります。

参照先 not_found.

◆ pop_min()

template<typename T>
T SortedTree< T >::pop_min ( )
inline

最小値を返し、削除する

sorted_tree.hpp29 行目に定義があります。

参照先 min(), not_found.

◆ pop_max()

template<typename T>
T SortedTree< T >::pop_max ( )
inline

最大値を返し、削除する

sorted_tree.hpp36 行目に定義があります。

参照先 max(), not_found.

◆ contains()

template<typename T>
bool SortedTree< T >::contains ( T x)
inline

x が含まれているか否かを返す

sorted_tree.hpp43 行目に定義があります。

◆ discard()

template<typename T>
bool SortedTree< T >::discard ( T x)
inline

x を削除する

sorted_tree.hpp46 行目に定義があります。

◆ gt()

template<typename T>
T SortedTree< T >::gt ( T x)
inline

x より大きい最小の値を返す

sorted_tree.hpp54 行目に定義があります。

参照先 not_found.

◆ ge()

template<typename T>
T SortedTree< T >::ge ( T x)
inline

x 以上最小の値を返す

sorted_tree.hpp61 行目に定義があります。

参照先 not_found.

◆ lt()

template<typename T>
T SortedTree< T >::lt ( T x)
inline

x 未満最大の値を返す

sorted_tree.hpp68 行目に定義があります。

参照先 not_found.

◆ le()

template<typename T>
T SortedTree< T >::le ( T x)
inline

x 以下の最大の値を返す

sorted_tree.hpp75 行目に定義があります。

参照先 not_found.

◆ count_lt()

template<typename T>
int SortedTree< T >::count_lt ( T x)
inline

x より小さい値の個数を返す

sorted_tree.hpp82 行目に定義があります。

◆ count_le()

template<typename T>
int SortedTree< T >::count_le ( T x)
inline

x 以下の値の個数を返す

sorted_tree.hpp85 行目に定義があります。

◆ count_gt()

template<typename T>
int SortedTree< T >::count_gt ( T x)
inline

x より大きい値の個数を返す

sorted_tree.hpp88 行目に定義があります。

◆ count_ge()

template<typename T>
int SortedTree< T >::count_ge ( T x)
inline

x 以上の値の個数を返す

sorted_tree.hpp91 行目に定義があります。

◆ kth_min()

template<typename T>
T SortedTree< T >::kth_min ( int k)
inline

k(0-indexed) 番目に小さい値の個数を返す

sorted_tree.hpp94 行目に定義があります。

◆ kth_max()

template<typename T>
T SortedTree< T >::kth_max ( int k)
inline

k(0-indexed) 番目に大きい値の個数を返す

sorted_tree.hpp97 行目に定義があります。

メンバ詳解

◆ not_found

template<typename T>
T SortedTree< T >::not_found =-1

sorted_tree.hpp9 行目に定義があります。


この構造体詳解は次のファイルから抽出されました: