System::Collections::Generic::_net_binnary_search Methode
System::Collections::Generic::_net_binnary_search(const containterT<T, Allocator>&, int, int, T) method
Implementiert binäre Suche in einem zufälligen Zugriffscontainer. Spezialisierung für Smart-Pointer. Verwendet die System::Object::CompareTo Methode.
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)
| Parameter | Beschreibung |
|---|---|
| containerT | STL‑ähnlicher Container‑Template‑Typ mit zwei Template‑Argumenten: Elementtyp und Allokator‑Typ. |
| T | Elementtyp. |
| Allocator | Allokator‑Typ. |
| Parameter | Typ | Beschreibung |
|---|---|---|
| Container | const containterT<T, Allocator>& | Container, in dem gesucht wird. |
| Index | int | Startindex des Suchbereichs. |
| count | int | Länge des Suchbereichs. |
| Wert | T | Gesuchter Wert. |
ReturnValue
Falls gefunden, Index des nächsten Elements; andernfalls Komplement des Index, an dem die Suche gestoppt wurde.
Siehe auch
- Namespace System::Collections::Generic
- Library Aspose.Font for C++
System::Collections::Generic::_net_binnary_search(const containterT<T, Allocator>&, int, int, T) method
Implementiert binäre Suche in einem zufälligen Zugriffscontainer. Spezialisierung für Werttypen. Verwendet die CompareTo‑Methode.
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)
| Parameter | Beschreibung |
|---|---|
| containerT | STL‑ähnlicher Container‑Template‑Typ mit zwei Template‑Argumenten: Elementtyp und Allokator‑Typ. |
| T | Elementtyp. |
| Allocator | Allokator‑Typ. |
| Parameter | Typ | Beschreibung |
|---|---|---|
| Container | const containterT<T, Allocator>& | Container, in dem gesucht wird. |
| Index | int | Startindex des Suchbereichs. |
| count | int | Länge des Suchbereichs. |
| Wert | T | Gesuchter Wert. |
ReturnValue
Falls gefunden, Index des nächsten Elements; andernfalls Komplement des Index, an dem die Suche gestoppt wurde.
Siehe auch
- Namespace System::Collections::Generic
- Library Aspose.Font for C++
System::Collections::Generic::_net_binnary_search(const containterT<T, Allocator>&, int, int, T) method
Implementiert binäre Suche in einem zufälligen Zugriffscontainer. Spezialisierung für skalare Typen. Vergleicht Elemente mit den Größer‑ und Kleiner‑Operatoren.
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)
| Parameter | Beschreibung |
|---|---|
| containerT | STL‑ähnlicher Container‑Template‑Typ mit zwei Template‑Argumenten: Elementtyp und Allokator‑Typ. |
| T | Elementtyp. |
| Allocator | Allokator‑Typ. |
| Parameter | Typ | Beschreibung |
|---|---|---|
| Container | const containterT<T, Allocator>& | Container, in dem gesucht wird. |
| Index | int | Startindex des Suchbereichs. |
| count | int | Länge des Suchbereichs. |
| Wert | T | Gesuchter Wert. |
ReturnValue
Falls gefunden, Index des nächsten Elements; andernfalls Komplement des Index, an dem die Suche gestoppt wurde.
Siehe auch
- Namespace System::Collections::Generic
- Library Aspose.Font for C++
System::Collections::Generic::_net_binnary_search(const containterT<T, Allocator>&, int, int, T, const SharedPtr<System::Collections::Generic::IComparer<T>>&) method
Implementiert binäre Suche in einem zufälligen Zugriffscontainer.
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)
| Parameter | Beschreibung |
|---|---|
| containerT | STL‑ähnlicher Container‑Template‑Typ mit zwei Template‑Argumenten: Elementtyp und Allokator‑Typ. |
| T | Elementtyp. |
| Allocator | Allokator‑Typ. |
| Parameter | Typ | Beschreibung |
|---|---|---|
| Container | const containterT<T, Allocator>& | Container, in dem gesucht wird. |
| Index | int | Startindex des Suchbereichs. |
| count | int | Länge des Suchbereichs. |
| Wert | T | Gesuchter Wert. |
| comparer | const SharedPtr<System::Collections::Generic::IComparer<T>>& | Comparer Objekt. |
ReturnValue
Falls gefunden, Index des nächsten Elements; andernfalls Komplement des Index, an dem die Suche gestoppt wurde.
Siehe auch
- Typedef SharedPtr
- Class IComparer
- Namespace System::Collections::Generic
- Library Aspose.Font for C++