F4
Library for Gröebner basis computations over finite fields.
 All Classes Namespaces Files Functions Variables Friends Pages
list-pointer-critical-pair.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Antoine Joux, Vanessa Vitse and Titouan Coladon
3  *
4  * This file is part of F4.
5  *
6  * F4 is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * F4 is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with F4. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
26 #ifndef F4_LIST_POINTER_CRITICAL_PAIR_H
27 #define F4_LIST_POINTER_CRITICAL_PAIR_H
28 
30 #include "global.h"
31 #include <iostream>
32 #include <cassert>
33 #include <iomanip>
35 #include "critical-pair.h"
36 #include "dynamic-array.h"
37 
41 namespace F4
42 {
47  template<typename Element>
49  {
50  public:
51 
52  /* Constructor */
53 
58 
59  /* Attributes */
60 
63  };
64 
65 
70  template<typename Element>
72  {
73  public:
74 
75  /* Constructor */
76 
81 
82 
83  /* Miscellaneous */
84 
89  void printListCriticalPair(std::ostream & stream) const;
90 
94  void reset();
95 
100 
101  /* Insertion */
102 
107  void insert(CriticalPair<Element> * cp);
108 
109 
110  /* Access */
111 
118 
119  private:
125  };
126 
131  template <typename Element>
132  std::ostream & operator<<(std::ostream & stream, ListPointerCriticalPair<Element> const & avlCriticalPair);
133 }
134 
136 #include "../src/list-pointer-critical-pair.inl"
139 #endif // F4_LIST_POINTER_CRITICAL_PAIR_H
NodeListPointerCriticalPair()
Constructor.
NodeListPointerCriticalPair< Element > * _root
Declaration of class DynamicArray.
Represent a critical pair.
Definition: critical-pair.h:44
Wrapper for config.h in order to avoid multiple definitions.
Represent a dynamic array whose the width is fixed, the memory is allocated by blocs.
Definition: dynamic-array.h:45
ListPointerCriticalPair()
Constructor.
Represent an AVL of pointers on critical pairs.
Declaration of class CriticalPair.
NodeListPointerCriticalPair< Element > const * getNext(NodeListPointerCriticalPair< Element > const *node) const
Get the next NodeListPointerCriticalPair after node.
NodeListPointerCriticalPair< Element > const * getRoot() const
Get the first element of the list.
Represent a node of the list.
DynamicArray< NodeListPointerCriticalPair< Element > > _array
NodeListPointerCriticalPair * _next
void reset()
Reset the List for a new usage, memory is not clear.
void printListCriticalPair(std::ostream &stream) const
Print the List.
void insert(CriticalPair< Element > *cp)
Insert the critical pair pointer cp in the list.
NodeListPointerCriticalPair< Element > * _it