Visual Computing Library
Loading...
Searching...
No Matches
adjacent_left_node_iterator.h
1/*****************************************************************************
2 * VCLib *
3 * Visual Computing Library *
4 * *
5 * Copyright(C) 2021-2025 *
6 * Visual Computing Lab *
7 * ISTI - Italian National Research Council *
8 * *
9 * All rights reserved. *
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the Mozilla Public License Version 2.0 as published *
13 * by the Mozilla Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 * This program is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 * Mozilla Public License Version 2.0 *
20 * (https://www.mozilla.org/en-US/MPL/2.0/) for more details. *
21 ****************************************************************************/
22
23#ifndef VCL_SPACE_COMPLEX_GRAPH_BIPARTITE_ITERATORS_ADJACENT_LEFT_NODE_ITERATOR_H
24#define VCL_SPACE_COMPLEX_GRAPH_BIPARTITE_ITERATORS_ADJACENT_LEFT_NODE_ITERATOR_H
25
26#include "adjacent_node_iterator.h"
27
28namespace vcl::detail {
29
30template<typename Graph, typename Iterator>
31class AdjacentLeftNodeIterator : public AdjacentNodeIterator<Graph, Iterator>
32{
33 using Base = AdjacentNodeIterator<Graph, Iterator>;
34
35public:
36 using value_type = Graph::RightType;
37 using reference = const value_type&;
38 using pointer = const value_type*;
39
40 using AdjacentNodeIterator<Graph, Iterator>::AdjacentNodeIterator;
41
42 reference operator*() const
43 {
44 return Base::mGraph->mNodesR[*(Base::mIt)].info();
45 }
46
47 pointer operator->() const
48 {
49 return &Base::mGraph->mNodesR[*(Base::mIt)].info();
50 }
51};
52
53} // namespace vcl::detail
54
55#endif // VCL_SPACE_COMPLEX_GRAPH_BIPARTITE_ITERATORS_ADJACENT_LEFT_NODE_ITERATOR_H