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::AvlMonomial Class Reference

Represent an avl of pair (number of a monomial, is leading monomial). More...

#include <avl-monomial.h>

Public Member Functions

 AvlMonomial ()
 Constructor.
 
void printAvlMonomial (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...
 
void setLT (int numMon)
 Add numMon to the unordered set _lt. More...
 
int insert (int numMon, bool lt)
 If numMon is already in the AVL, update its lt flag, otherwise insert a new node. More...
 
NodeAvlMonomialfindBiggest ()
 Find the biggest NodeAvlMonomial of the AVL. More...
 
NodeAvlMonomialfindNextBiggest (NodeAvlMonomial *node)
 Find the next biggest NodeAvlMonomial after node. More...
 

Private Attributes

DynamicArray< NodeAvlMonomial_array
 
unordered_set< int > _umon
 
unordered_set< int > _lt
 
NodeAvlMonomial_it
 
NodeAvlMonomial_root
 
NodeAvlMonomial _node
 

Detailed Description

Represent an avl of pair (number of a monomial, is leading monomial).

Definition at line 79 of file avl-monomial.h.

Member Function Documentation

NodeAvlMonomial* F4::AvlMonomial::findBiggest ( )

Find the biggest NodeAvlMonomial of the AVL.

Returns
Pointer on the biggest node.
NodeAvlMonomial* F4::AvlMonomial::findNextBiggest ( NodeAvlMonomial node)

Find the next biggest NodeAvlMonomial after node.

Parameters
nodePointer on a node.
Returns
Pointer on the next biggest NodeAvlMonomial after node.
int F4::AvlMonomial::insert ( int  numMon,
bool  lt 
)

If numMon is already in the AVL, update its lt flag, otherwise insert a new node.

Parameters
numMonNumber of a monomial.
lttrue if numMon is a leading monomial, false otherwise.
Returns
0 if a new NodeAvlMonomial is created.
1 if the monomial already exist.
2 if the monomial already exist but was not a leading term. In this case its lt flag is set to 1.
void F4::AvlMonomial::printAvlMonomial ( std::ostream &  stream) const

Print the AVL.

Parameters
streamStream.
void F4::AvlMonomial::setLT ( int  numMon)

Add numMon to the unordered set _lt.

Parameters
numMonNumber of a monomial.
size_t F4::AvlMonomial::size ( ) const

Get the number of element in the AVL.

Returns
Number of element in the AVL.

Member Data Documentation

DynamicArray<NodeAvlMonomial> F4::AvlMonomial::_array
private

Dynamic array of NodeAvlMonomial.

Definition at line 146 of file avl-monomial.h.

NodeAvlMonomial* F4::AvlMonomial::_it
private

Iterator.

Definition at line 149 of file avl-monomial.h.

unordered_set<int> F4::AvlMonomial::_lt
private

Unorder set of lt to test membership

Definition at line 148 of file avl-monomial.h.

NodeAvlMonomial F4::AvlMonomial::_node
private

Node (speed up openf4)

Definition at line 151 of file avl-monomial.h.

NodeAvlMonomial* F4::AvlMonomial::_root
private

Root of the AVL.

Definition at line 150 of file avl-monomial.h.

unordered_set<int> F4::AvlMonomial::_umon
private

Unorder set of monomial number to test membership

Definition at line 147 of file avl-monomial.h.


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