System::Collections::Generic::_net_binnary_search メソッド

System::Collections::Generic::_net_binnary_search(const containterT<T, Allocator>&, int, int, T) method

ランダムアクセスコンテナで二分探索を実装します。スマートポインタ用の特殊化です。System::Object::CompareTo メソッドを使用します。

template<template< typename, typename > class,class T,class Allocator> std::enable_if<IsSmartPtr<T>::value, int>::type System::Collections::Generic::_net_binnary_search(const containterT<T, Allocator> &container, int index, int count, T value)
パラメーター説明
containerT要素型とアロケータ型の 2 つのテンプレート引数を持つ STL 形式のコンテナテンプレート型です。
T要素型。
AllocatorAllocator 型です。
パラメーター説明
コンテナconst containterT<T, Allocator>&検索対象のコンテナです。
インデックスint検索範囲の開始インデックスです。
countint検索範囲の長さです。
valueT検索する値。

ReturnValue

見つかった場合は次の要素のインデックス、見つからなかった場合は検索が停止したインデックスの補数。

参照

System::Collections::Generic::_net_binnary_search(const containterT<T, Allocator>&, int, int, T) method

ランダムアクセスコンテナで二分探索を実装します。値型の特殊化です。CompareTo メソッドを使用します。

template<template< typename, typename > class,class T,class Allocator> std::enable_if<!IsSmartPtr<T>::value &&!std::is_scalar<T>::value, int>::type System::Collections::Generic::_net_binnary_search(const containterT<T, Allocator> &container, int index, int count, T value)
パラメーター説明
containerT要素型とアロケータ型の 2 つのテンプレート引数を持つ STL 形式のコンテナテンプレート型です。
T要素型。
AllocatorAllocator 型です。
パラメーター説明
コンテナconst containterT<T, Allocator>&検索対象のコンテナです。
インデックスint検索範囲の開始インデックスです。
countint検索範囲の長さです。
valueT検索する値。

ReturnValue

見つかった場合は次の要素のインデックス、見つからなかった場合は検索が停止したインデックスの補数。

参照

System::Collections::Generic::_net_binnary_search(const containterT<T, Allocator>&, int, int, T) method

ランダムアクセスコンテナで二分探索を実装します。スカラー型の特殊化です。要素を大なり・小なり演算子で比較します。

template<template< typename, typename > class,class T,class Allocator> std::enable_if<std::is_scalar<T>::value, int>::type System::Collections::Generic::_net_binnary_search(const containterT<T, Allocator> &container, int index, int count, T value)
パラメーター説明
containerT要素型とアロケータ型の 2 つのテンプレート引数を持つ STL 形式のコンテナテンプレート型です。
T要素型。
AllocatorAllocator 型です。
パラメーター説明
コンテナconst containterT<T, Allocator>&検索対象のコンテナです。
インデックスint検索範囲の開始インデックスです。
countint検索範囲の長さです。
valueT検索する値。

ReturnValue

見つかった場合は次の要素のインデックス、見つからなかった場合は検索が停止したインデックスの補数。

参照

System::Collections::Generic::_net_binnary_search(const containterT<T, Allocator>&, int, int, T, const SharedPtr<System::Collections::Generic::IComparer<T>>&) method

ランダムアクセスコンテナで二分探索を実装します。

template<template< typename, typename > class,class T,class Allocator> int System::Collections::Generic::_net_binnary_search(const containterT<T, Allocator> &container, int index, int count, T value, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparer)
パラメーター説明
containerT要素型とアロケータ型の 2 つのテンプレート引数を持つ STL 形式のコンテナテンプレート型です。
T要素型。
AllocatorAllocator 型です。
パラメーター説明
コンテナconst containterT<T, Allocator>&検索対象のコンテナです。
インデックスint検索範囲の開始インデックスです。
countint検索範囲の長さです。
valueT検索する値。
comparerconst SharedPtr<System::Collections::Generic::IComparer<T>>&Comparer オブジェクト。

ReturnValue

見つかった場合は次の要素のインデックス、見つからなかった場合は検索が停止したインデックスの補数。

参照