Skip to content

Commit a84c2d3

Browse files
committed
New version of SBG Matching [IN PROCESS]
1 parent a89376d commit a84c2d3

14 files changed

Lines changed: 581 additions & 424 deletions

File tree

algorithms/matching/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
target_sources(
22
sbgraph
33
PRIVATE
4+
af_matching.cpp
45
matching.cpp
6+
paths.cpp
57
)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*******************************************************************************
2+
3+
This file is part of Set--Based Graph Library.
4+
5+
SBG Library is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
SBG Library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with SBG Library. If not, see <http://www.gnu.org/licenses/>.
17+
18+
******************************************************************************/
19+
20+
#include "algorithms/matching/af_matching.hpp"
21+
22+
namespace SBG {
23+
24+
namespace LIB {
25+
26+
////////////////////////////////////////////////////////////////////////////////
27+
// Minimum Reachable SCC AF ----------------------------------------------------
28+
////////////////////////////////////////////////////////////////////////////////
29+
30+
Matching BFSMatchingAF::createMatchAlgorithm(const PWMapAF &fact) const
31+
{
32+
return Matching(std::make_unique<BFSMatching>(fact));
33+
}
34+
35+
} // namespace LIB
36+
37+
} // namespace SBG
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/** @file af_matching.hpp
2+
3+
@brief <b>Matching Algorithm Abstract Factory</b>
4+
5+
<hr>
6+
7+
This file is part of Set--Based Graph Library.
8+
9+
SBG Library is free software: you can redistribute it and/or modify
10+
it under the terms of the GNU General Public License as published by
11+
the Free Software Foundation, either version 3 of the License, or
12+
(at your option) any later version.
13+
14+
SBG Library is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
GNU General Public License for more details.
18+
19+
You should have received a copy of the GNU General Public License
20+
along with SBG Library. If not, see <http://www.gnu.org/licenses/>.
21+
22+
******************************************************************************/
23+
24+
#ifndef SBG_AF_MATCHING_HPP
25+
#define SBG_AF_MATCHING_HPP
26+
27+
#include "matching.hpp"
28+
29+
namespace SBG {
30+
31+
namespace LIB {
32+
33+
struct MatchingAF {
34+
public:
35+
virtual ~MatchingAF() = default;
36+
MatchingAF() = default;
37+
38+
virtual Matching createMatchAlgorithm(const PWMapAF &fact) const = 0;
39+
};
40+
41+
struct BFSMatchingAF : public MatchingAF {
42+
public:
43+
BFSMatchingAF() = default;
44+
45+
Matching createMatchAlgorithm(const PWMapAF &fact) const override;
46+
};
47+
48+
} // namespace LIB
49+
50+
} // namespace SBG
51+
52+
#endif

0 commit comments

Comments
 (0)