The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fib::algorithms::nTidyFibObjects::nBalanceLists Namespace Reference

Functions

cListbalanceList (cList *pListToBalance, unsigned long ulMaxUnderobjects)
cListbalanceListTree (cList *pListToBalance, unsigned long ulMaxUnderobjects)
cFibElementbalanceFibTreeLists (cFibElement *pFibObject, unsigned long ulMaxUnderobjects, bool bCombineSubLists=false)
cListcreateBalancedList (list< cFibElement * > &liInOutUnderobjects, unsigned long ulMaxUnderobjects)
cListeliminateListTree (cList *pList)
cFibElementeliminateListTrees (cFibElement *pFibObject)

Function Documentation

cFibElement* fib::algorithms::nTidyFibObjects::nBalanceLists::balanceFibTreeLists ( cFibElement pFibObject,
unsigned long  ulMaxUnderobjects,
bool  bCombineSubLists = false 
)

This function balances all listelements in the given fib -object. It will split the contained lists into more list, so that every list dosn't contain more than ulMaxUnderobjects underobjects. The created list will be underobjects of the given list.

See also:
balanceList()
balanceListTree()
Parameters:
bCombineSubListsif true the lists are combined recursive with ther direct sublists (
See also:
balanceListTree() will be used to balance the lists), else, if false, all lists will be considerd seperatly (
balanceList() will be used to balance the lists)
Parameters:
pFibObjecta pointer to the fib -object to balance
ulMaxUnderobjectsthe maximum number of underobjects the balanced lists should have
Returns:
a pointer to the balanced fib -object pFibObject
cList* fib::algorithms::nTidyFibObjects::nBalanceLists::balanceList ( cList pListToBalance,
unsigned long  ulMaxUnderobjects 
)

This function will balance the given listobject. It will split the given list into more list, so that every list dosn't contain more than ulMaxUnderobjects underobjects. The created list will be underobjects of the given list. The maximal depth of the created list tree will be minimal d and the minimal depth of the created list tree will be (d - 1) .

Parameters:
pListToBalancea pointer to the list to balance
ulMaxUnderobjectsthe maximum number of underobjects the balanced lists should have
Returns:
a pointer to the balanced list pListToBalance
cList* fib::algorithms::nTidyFibObjects::nBalanceLists::balanceListTree ( cList pListToBalance,
unsigned long  ulMaxUnderobjects 
)

This function will balance the given listobjecttree. Every listelement which is an direct underobject of the given list or wich is an direct underobject of such list is element of the listtree. It will split the given listtree into more list, so that every list dosn't contain more than ulMaxUnderobjects underobjects. The created list will be underobjects of the given list. The maximal depth of the created list tree will be minimal d and the minimal depth of the created list tree will be (d - 1) .

This function works basicly like balanceList(), if all non listelement listunderobjects of the listtree are combined in one listelement.

See also:
balanceList()
Parameters:
pListToBalancea pointer to the list to balance
ulMaxUnderobjectsthe maximum number of underobjects the balanced lists should have
Returns:
a pointer to the balanced list pListToBalance
cList* fib::algorithms::nTidyFibObjects::nBalanceLists::createBalancedList ( list< cFibElement * > &  liInOutUnderobjects,
unsigned long  ulMaxUnderobjects 
)

This function will balance the underobjects in the given list. It will portion the given underobjects into fib -listelements, so that every created listelements contains maximal ulMaxUnderobjects underobjects. The underobjects of the given list will be in the last layer of the created listtree. The created listelements will be nested, so that each contain maximal ulMaxUnderobjects underobjects. Beware: You have to care, that the returned listobject is deleted after usage.

Parameters:
liInOutUnderobjectsa reference to the list with the underobjects Beware: This list will be changed. (To speed up the evaluation.)
ulMaxUnderobjectsthe maximum number of underobjects the balanced lists should have
Returns:
the balanced listtree with the given underobjects liInOutUnderobjects
cList* fib::algorithms::nTidyFibObjects::nBalanceLists::eliminateListTree ( cList pList)

This function builds an listobject, which is equivalent to the given listobject, but which topmost listelement has no listobjects as underobjects. For this, all underobjects of the topmost listelement, wich are listobjects, are replaced by the ther topmost underobjects, which arn't listobjects.

Parameters:
pLista pointer to the listobject, wher to eleminate the direct listunderobjects
Returns:
a pointer to the listobject pList, which has no direct listunderobjects
cFibElement* fib::algorithms::nTidyFibObjects::nBalanceLists::eliminateListTrees ( cFibElement pFibObject)

This function eleminates all listunderobjects of all listobjects in the given fib -object pFibObject. The changed fib -object will represent the same multimediaobject as the original.

See also:
eliminateListTree()
Parameters:
pFibObjecta pointer to the fib -object, wher to eleminate the direct listunderobjects of the listobjects
Returns:
a pointer to the fib -object pFibObject, in which the listobjects have no direct listunderobjects