-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include and wrap Glasgow Subgraph Solver (#221)
Add subgraph package to find subgraph isomorphisms (a.k.a. native embeddings) * added portable-snippets submodule * added glasgow subgraph solver submodule (temporarily using @boothby's fork) * added fake boost library * added note about submodules in python installation instructions
- Loading branch information
Showing
20 changed files
with
765 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "external/portable-snippets"] | ||
path = external/portable-snippets | ||
url = [email protected]:nemequ/portable-snippets.git | ||
[submodule "external/glasgow-subgraph-solver"] | ||
path = external/glasgow-subgraph-solver | ||
url = [email protected]:boothby/glasgow-subgraph-solver.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
global-include *.hpp | ||
include rectangle-packer/*/* | ||
recursive-include external/glasgow-subgraph-solver *.hh LICENSE | ||
recursive-include external/portable-snippets builtin.h COPYING.md | ||
recursive-include external/boost BOOST_LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Boost Software License - Version 1.0 - August 17th, 2003 | ||
|
||
Permission is hereby granted, free of charge, to any person or organization | ||
obtaining a copy of the software and accompanying documentation covered by | ||
this license (the "Software") to use, reproduce, display, distribute, | ||
execute, and transmit the Software, and to prepare derivative works of the | ||
Software, and to permit third-parties to whom the Software is furnished to | ||
do so, all subject to the following: | ||
|
||
The copyright notices in the Software and this entire statement, including | ||
the above license grant, this restriction and the following disclaimer, | ||
must be included in all copies of the Software, in whole or in part, and | ||
all derivative works of the Software, unless such copies or derivative | ||
works are solely in the form of machine-executable object code generated by | ||
a source language processor. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2022-2023 D-Wave Systems Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// Excerpted from and/or inspired by implementations found in the Boost Library | ||
// see external/boost/BOOST_LICENSE or https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#pragma once | ||
|
||
#include <boost/bimap/unordered_set_of.hpp> | ||
#include <unordered_map> | ||
#include <tuple> | ||
|
||
namespace boost { | ||
|
||
template<typename L, typename R, typename Alloc> | ||
class bimap; | ||
|
||
template<typename L, typename R, typename Alloc> | ||
class bimap<boost::bimaps::unordered_set_of<L>, boost::bimaps::unordered_set_of<R>, Alloc> { | ||
public: | ||
std::unordered_map<L, R> left; | ||
std::unordered_map<R, L> right; | ||
typedef typename std::pair<L, R> value_type; | ||
|
||
void insert(const value_type v) { | ||
left.insert(std::make_pair(v.first, v.second)); | ||
right.insert(std::make_pair(v.second, v.first)); | ||
} | ||
|
||
bimap() {} | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2022-2023 D-Wave Systems Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// Excerpted from and/or inspired by implementations found in the Boost Library | ||
// see external/boost/BOOST_LICENSE or https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#pragma once | ||
|
||
namespace boost::bimaps { | ||
|
||
template<typename T> | ||
class unordered_set_of { | ||
typedef T value_type; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2022-2023 D-Wave Systems Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// Excerpted from and/or inspired by implementations found in the Boost Library | ||
// see external/boost/BOOST_LICENSE or https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#pragma once | ||
|
||
namespace boost::container { | ||
|
||
template<typename T> class allocator {}; | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2022-2023 D-Wave Systems Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// Excerpted from and/or inspired by implementations found in the Boost Library | ||
// see external/boost/BOOST_LICENSE or https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#pragma once | ||
|
||
namespace boost { | ||
|
||
template <typename T> | ||
inline void hash_combine(std::size_t & seed, const T value) { | ||
std::hash<T> h; | ||
hash_combine(seed, h(value)); | ||
} | ||
|
||
template <> | ||
inline void hash_combine(std::size_t & seed, const std::size_t value) { | ||
seed ^= value + 0x9e3779b9 + (seed << 6) + (seed >> 2); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2022-2023 D-Wave Systems Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// Excerpted from and/or inspired by implementations found in the Boost Library | ||
// see external/boost/BOOST_LICENSE or https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#pragma once | ||
|
||
#include <fstream> | ||
#include <iostream> | ||
#include <string> | ||
|
||
namespace boost::iostreams { | ||
|
||
std::ofstream file_sink(const std::string &fn) { | ||
std::ofstream outfile; | ||
outfile.open(fn); | ||
return outfile; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2022-2023 D-Wave Systems Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// Excerpted from and/or inspired by implementations found in the Boost Library | ||
// see external/boost/BOOST_LICENSE or https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#pragma once | ||
|
||
#include <stdexcept> | ||
|
||
namespace boost::iostreams { | ||
|
||
bool bzip2_compressor() { | ||
throw std::runtime_error("filtering_ostream is not implemented"); | ||
return false; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright 2022-2023 D-Wave Systems Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// Excerpted from and/or inspired by implementations found in the Boost Library | ||
// see external/boost/BOOST_LICENSE or https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#pragma once | ||
|
||
#include <iostream> | ||
#include <streambuf> | ||
namespace boost::iostreams { | ||
|
||
class filtering_ostream: public std::basic_ostream<char> { | ||
class fake_streambuf: public std::basic_streambuf<char> { | ||
public: | ||
fake_streambuf() : std::basic_streambuf<char>() {} | ||
}; | ||
fake_streambuf sb; | ||
public: | ||
filtering_ostream() : sb(), basic_ostream(&sb) {} | ||
template<typename T> | ||
void push(T) { throw std::runtime_error("filtering_ostream is not implemented"); } | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2022-2023 D-Wave Systems Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// Excerpted from and/or inspired by implementations found in the Boost Library | ||
// see external/boost/BOOST_LICENSE or https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#pragma once |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2022-2023 D-Wave Systems Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// Excerpted from and/or inspired by implementations found in the Boost Library | ||
// see external/boost/BOOST_LICENSE or https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#pragma once | ||
|
||
namespace boost::multiprecision { | ||
|
||
typedef long long int cpp_int; | ||
|
||
} |
Oops, something went wrong.