util
KDevelop::EmbeddedTreeAlgorithms< Data, ItemHandler > Class Template Reference
Responsible for handling the items in the list This is an example. More...
#include <embeddedfreetree.h>
Public Member Functions | |
| EmbeddedTreeAlgorithms (const Data *items, uint itemCount, const int ¢ralFreeItem) | |
| uint | countFreeItems () const |
| uint | countFreeItemsNaive () const |
| int | indexOf (const Data &data, uint start, uint end) |
| int | indexOf (const Data &data) |
| int | lowerBound (const Data &data, int start, int end) |
| void | verifyOrder () |
| void | verifyTreeConsistent () |
Detailed Description
template<class Data, class ItemHandler>
class KDevelop::EmbeddedTreeAlgorithms< Data, ItemHandler >
Responsible for handling the items in the list This is an example.
ItemHandler::rightChild(..) and ItemHandler::leftChild(..) must be values that must be able to hold the count of positive values that will be the maximum size of the list, and additionally -1. Use this for several constant algorithms on sorted lists with free-trees
Definition at line 99 of file embeddedfreetree.h.
Member Function Documentation
| int KDevelop::EmbeddedTreeAlgorithms< Data, ItemHandler >::indexOf | ( | const Data & | data, | |
| uint | start, | |||
| uint | end | |||
| ) | [inline] |
Searches the given item within the specified bounds.
Definition at line 116 of file embeddedfreetree.h.
| int KDevelop::EmbeddedTreeAlgorithms< Data, ItemHandler >::indexOf | ( | const Data & | data | ) | [inline] |
Efficiently checks whether the item is contained in the set.
If it is contained, returns the index. Else, returns -1.
Definition at line 111 of file embeddedfreetree.h.
| int KDevelop::EmbeddedTreeAlgorithms< Data, ItemHandler >::lowerBound | ( | const Data & | data, | |
| int | start, | |||
| int | end | |||
| ) | [inline] |
Returns the first valid index that has a data-value larger or equal to.
- Parameters:
-
data. Returns -1 if nothing is found.
Definition at line 147 of file embeddedfreetree.h.
The documentation for this class was generated from the following file:
KDE 4.4 API Reference