OPENF4
Library for Gröebner basis computations over finite fields.
 All Classes Namespaces Files Functions Variables Friends Pages
Public Member Functions | Private Attributes | List of all members
F4::AvlCriticalPair< Element > Class Template Reference

Represent an avl of critical pair. More...

#include <avl-critical-pair.h>

Public Member Functions

 AvlCriticalPair ()
 Constructor.
 
void printAvlCriticalPair (std::ostream &stream) const
 Print the AVL. More...
 
void reset ()
 Reset the AVL for a new usage, memory is not clear.
 
size_t size () const
 Get the number of element in the AVL. More...
 
bool isEmpty () const
 Test if the AVL is empty. More...
 
void testAVL ()
 Test if the AVL is consistent.
 
int insert (CriticalPair< Element > cp)
 Insert the critical pair cp in the AVL. More...
 
NodeAvlCriticalPair< Element > * erase (NodeAvlCriticalPair< Element > *node)
 Delete the node pointed by node from the AVL. More...
 
NodeAvlCriticalPair< Element > * findBiggest ()
 Find the biggest NodeAvlCriticalPair of the AVL. More...
 
NodeAvlCriticalPair< Element >
const * 
findBiggest () const
 Find the biggest NodeAvlCriticalPair of the AVL. More...
 
NodeAvlCriticalPair< Element > * findNextBiggest (NodeAvlCriticalPair< Element > *node)
 Find the next biggest NodeAvlCriticalPair after node. More...
 
NodeAvlCriticalPair< Element >
const * 
findNextBiggest (NodeAvlCriticalPair< Element > const *node) const
 Find the next biggest NodeAvlCriticalPair after node. More...
 
NodeAvlCriticalPair< Element > * findSmallest ()
 Find the smallest NodeAvlCriticalPair of the AVL. More...
 
NodeAvlCriticalPair< Element >
const * 
findSmallest () const
 Find the smallest NodeAvlCriticalPair of the AVL. More...
 
NodeAvlCriticalPair< Element > * findNextSmallest (NodeAvlCriticalPair< Element > *node)
 Find the next smallest NodeAvlCriticalPair after node. More...
 
NodeAvlCriticalPair< Element >
const * 
findNextSmallest (NodeAvlCriticalPair< Element > const *node) const
 Find the next smallest NodeAvlCriticalPair after node. More...
 

Private Attributes

DynamicArray
< NodeAvlCriticalPair< Element > > 
_array
 
NodeAvlCriticalPair< Element > * _it
 
NodeAvlCriticalPair< Element > * _root
 
size_t _size
 

Detailed Description

template<typename Element>
class F4::AvlCriticalPair< Element >

Represent an avl of critical pair.

Definition at line 81 of file avl-critical-pair.h.

Member Function Documentation

template<typename Element >
NodeAvlCriticalPair<Element>* F4::AvlCriticalPair< Element >::erase ( NodeAvlCriticalPair< Element > *  node)

Delete the node pointed by node from the AVL.

Precondition
node belongs to the avl, if node = 0, the AVL is clear.
Parameters
nodePointer on a node.
Returns
Pointer on the next node after the deleted one (if elements are erased from the smallest to the biggest).
template<typename Element >
NodeAvlCriticalPair<Element>* F4::AvlCriticalPair< Element >::findBiggest ( )

Find the biggest NodeAvlCriticalPair of the AVL.

Returns
Pointer on the biggest node.
template<typename Element >
NodeAvlCriticalPair<Element> const* F4::AvlCriticalPair< Element >::findBiggest ( ) const

Find the biggest NodeAvlCriticalPair of the AVL.

Returns
Pointer on the biggest node.
template<typename Element >
NodeAvlCriticalPair<Element>* F4::AvlCriticalPair< Element >::findNextBiggest ( NodeAvlCriticalPair< Element > *  node)

Find the next biggest NodeAvlCriticalPair after node.

Parameters
nodePointer on a node.
Returns
Pointer on the next biggest NodeAvlCriticalPair after node.
template<typename Element >
NodeAvlCriticalPair<Element> const* F4::AvlCriticalPair< Element >::findNextBiggest ( NodeAvlCriticalPair< Element > const *  node) const

Find the next biggest NodeAvlCriticalPair after node.

Parameters
nodePointer on a node.
Returns
Pointer on the next biggest NodeAvlCriticalPair after node.
template<typename Element >
NodeAvlCriticalPair<Element>* F4::AvlCriticalPair< Element >::findNextSmallest ( NodeAvlCriticalPair< Element > *  node)

Find the next smallest NodeAvlCriticalPair after node.

Parameters
nodePointer on a node.
Returns
Pointer on the next smallest NodeAvlCriticalPair after node.
template<typename Element >
NodeAvlCriticalPair<Element> const* F4::AvlCriticalPair< Element >::findNextSmallest ( NodeAvlCriticalPair< Element > const *  node) const

Find the next smallest NodeAvlCriticalPair after node.

Parameters
nodePointer on a node.
Returns
Pointer on the next smallest NodeAvlCriticalPair after node.
template<typename Element >
NodeAvlCriticalPair<Element>* F4::AvlCriticalPair< Element >::findSmallest ( )

Find the smallest NodeAvlCriticalPair of the AVL.

Returns
Pointer on the smallest node.
template<typename Element >
NodeAvlCriticalPair<Element> const* F4::AvlCriticalPair< Element >::findSmallest ( ) const

Find the smallest NodeAvlCriticalPair of the AVL.

Returns
Pointer on the smallest node.
template<typename Element >
int F4::AvlCriticalPair< Element >::insert ( CriticalPair< Element >  cp)

Insert the critical pair cp in the AVL.

Parameters
cpCritical pair
Returns
0 if a new NodeAvlCriticalPair is created.
1 if cp already exist in the AVL.
template<typename Element >
bool F4::AvlCriticalPair< Element >::isEmpty ( ) const

Test if the AVL is empty.

Returns
true if the AVL is empty.
false otherwise.
template<typename Element >
void F4::AvlCriticalPair< Element >::printAvlCriticalPair ( std::ostream &  stream) const

Print the AVL.

Parameters
streamStream.
template<typename Element >
size_t F4::AvlCriticalPair< Element >::size ( ) const

Get the number of element in the AVL.

Returns
Number of element in the AVL.

Member Data Documentation

template<typename Element >
DynamicArray<NodeAvlCriticalPair<Element> > F4::AvlCriticalPair< Element >::_array
private

Dynamic array of NodeAvlCriticalPair.

Definition at line 201 of file avl-critical-pair.h.

template<typename Element >
NodeAvlCriticalPair<Element>* F4::AvlCriticalPair< Element >::_it
private

Iterator.

Definition at line 202 of file avl-critical-pair.h.

template<typename Element >
NodeAvlCriticalPair<Element>* F4::AvlCriticalPair< Element >::_root
private

Root of the AVL.

Definition at line 203 of file avl-critical-pair.h.

template<typename Element >
size_t F4::AvlCriticalPair< Element >::_size
private

Number of node in the AVL.

Definition at line 204 of file avl-critical-pair.h.


The documentation for this class was generated from the following file: