Loading...
Searching...
No Matches
Active_witness.h
1/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
2 * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
3 * Author(s): Siargey Kachanovich
4 *
5 * Copyright (C) 2016 Inria
6 *
7 * Modification(s):
8 * - YYYY/MM Author: Description of the modification
9 */
10
11#ifndef ACTIVE_WITNESS_ACTIVE_WITNESS_H_
12#define ACTIVE_WITNESS_ACTIVE_WITNESS_H_
13
14#include <gudhi/Active_witness/Active_witness_iterator.h>
15#include <list>
16
17namespace Gudhi {
18
19namespace witness_complex {
20
25template< typename Id_distance_pair,
26 typename INS_range >
28 public:
30 typedef typename INS_range::iterator INS_iterator;
32 typedef typename std::list<Id_distance_pair> Table;
33
34 Table nearest_landmark_table_;
35 INS_range search_range_;
36 INS_iterator iterator_next_;
37 INS_iterator iterator_end_;
38
39 Active_witness(const INS_range& search_range)
40 : search_range_(search_range), iterator_next_(search_range_.begin()), iterator_end_(search_range_.end()) {
41 }
42
43 iterator begin() {
44 return iterator(this, nearest_landmark_table_.begin());
45 }
46
47 iterator end() {
48 return iterator(this);
49 }
50};
51
52} // namespace witness_complex
53} // namespace Gudhi
54
55#endif // ACTIVE_WITNESS_ACTIVE_WITNESS_H_
Iterator in the nearest landmark list.
Definition: Active_witness_iterator.h:34
Class representing a list of nearest neighbors to a given witness.
Definition: Active_witness.h:27