| 97 | |
| 98 | |
| 99 | class list |
| 100 | { |
| 101 | |
| 102 | |
| 103 | |
| 104 | private: |
| 105 | |
| 106 | |
| 107 | element *start; |
| 108 | // pointer to the beginning |
| 109 | |
| 110 | |
| 111 | |
| 112 | public: |
| 113 | |
| 114 | |
| 115 | // constructors and destructor |
| 116 | |
| 117 | list(); |
| 118 | // Creates an "empty" list (with a dummy element for a user friendly |
| 119 | // iterator class, see the comments in list.cc). |
| 120 | |
| 121 | list(const list&); |
| 122 | // copy-constructor |
| 123 | |
| 124 | ~list(); |
| 125 | // destructor |
| 126 | |
| 127 | |
| 128 | |
| 129 | // inserting |
| 130 | |
| 131 | list& insert(binomial&); |
| 132 | list& copy_insert(const binomial&); |
| 133 | // These operations insert a binomial at the beginning of the list: |
| 134 | // insert does this by placing pointers on it, copy_insert by copying the |
| 135 | // binomial. |
| 136 | // The first operation is dangerous; but the consequent use of the |
| 137 | // combination insert - extract_element (cf. class list_iterator) instead of |
| 138 | // copy_insert - delete_element is very important for the performance of |
| 139 | // Buchberger's algorithm. |
| 140 | |
| 141 | list& _insert(binomial&); |
| 142 | list& _copy_insert(const binomial&); |
| 143 | // A little more efficient insert function for list that do not use |
| 144 | // the 3 flags - these are not set. |
| 145 | // It is not more efficient to implement these simpler lists as an own class. |
| 146 | |
| 147 | list& ordered_insert(binomial&, const term_ordering&); |
| 148 | list& ordered_copy_insert(const binomial&, const term_ordering&); |
| 149 | // These operations insert a binomial according to the given term ordering |
| 150 | // into a list. (The list should be ordered by the same term ordering.) |
| 151 | // To insert elements, we use a simple linear search. |
| 152 | |
| 153 | list& _ordered_insert(binomial&, const term_ordering&); |
| 154 | list& _ordered_copy_insert(const binomial&, const term_ordering&); |
| 155 | // A little more efficient ordered_insert function for list that do not use |
| 156 | // the 3 flags - these are not set. |
no outgoing calls
no test coverage detected