gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge #306
0 1 0
merge default
0 files changed with 17 insertions and 0 deletions:
↑ Collapse diff ↑
Show white space 24 line context
... ...
@@ -156,24 +156,41 @@
156 156
      }
157 157
      if (_active) {
158 158
        delete _active;
159 159
      }
160 160
      if (_bucket) {
161 161
        delete _bucket;
162 162
      }
163 163
      if (_flow) {
164 164
        delete _flow;
165 165
      }
166 166
    }
167 167

	
168
    /// \brief Set the tolerance used by the algorithm.
169
    ///
170
    /// This function sets the tolerance object used by the algorithm.
171
    /// \return <tt>(*this)</tt>
172
    HaoOrlin& tolerance(const Tolerance& tolerance) {
173
      _tolerance = tolerance;
174
      return *this;
175
    }
176

	
177
    /// \brief Returns a const reference to the tolerance.
178
    ///
179
    /// This function returns a const reference to the tolerance object
180
    /// used by the algorithm.
181
    const Tolerance& tolerance() const {
182
      return _tolerance;
183
    }
184

	
168 185
  private:
169 186

	
170 187
    void activate(const Node& i) {
171 188
      (*_active)[i] = true;
172 189

	
173 190
      int bucket = (*_bucket)[i];
174 191

	
175 192
      if ((*_prev)[i] == INVALID || (*_active)[(*_prev)[i]]) return;
176 193
      //unlace
177 194
      (*_next)[(*_prev)[i]] = (*_next)[i];
178 195
      if ((*_next)[i] != INVALID) {
179 196
        (*_prev)[(*_next)[i]] = (*_prev)[i];
0 comments (0 inline)