-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added documentation on subgraph isomorphism algorithm.
- Loading branch information
orazve
authored
Dec 1, 2021
1 parent
6219dc8
commit 8581afd
Showing
16 changed files
with
377 additions
and
32 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
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,26 @@ | ||
.. ****************************************************************************** | ||
.. * Copyright 2021 Intel Corporation | ||
.. * | ||
.. * 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. | ||
.. *******************************************************************************/ | ||
===== | ||
Graph | ||
===== | ||
|
||
This chapter describes programming interfaces of the graph algorithms implemented in |short_name|: | ||
|
||
.. toctree:: | ||
:titlesonly: | ||
|
||
subgraph-isomorphism.rst |
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,90 @@ | ||
.. ****************************************************************************** | ||
.. * Copyright 2021 Intel Corporation | ||
.. * | ||
.. * 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. | ||
.. *******************************************************************************/ | ||
.. default-domain:: cpp | ||
|
||
.. _api_subgraph_isomorphism: | ||
|
||
==================== | ||
Subgraph Isomorphism | ||
==================== | ||
|
||
.. include:: ../../../includes/graph/subgraph-isomorphism-introduction.rst | ||
|
||
------------------------ | ||
Mathematical formulation | ||
------------------------ | ||
|
||
Refer to :ref:`Developer Guide: Subgraph Isomorphism <alg_subgraph_isomorphism>`. | ||
|
||
--------------------- | ||
Programming Interface | ||
--------------------- | ||
All types and functions in this section are declared in the | ||
``oneapi::dal::preview::subgraph_isomorphism`` namespace and | ||
available via inclusion of the ``oneapi/dal/algo/subgraph_isomorphism.hpp`` header file. | ||
|
||
Descriptor | ||
---------- | ||
.. onedal_class:: oneapi::dal::preview::subgraph_isomorphism::descriptor | ||
|
||
Method tags | ||
~~~~~~~~~~~ | ||
.. onedal_tags_namespace:: oneapi::dal::preview::subgraph_isomorphism::method | ||
|
||
Task tags | ||
~~~~~~~~~ | ||
.. onedal_tags_namespace:: oneapi::dal::preview::subgraph_isomorphism::task | ||
|
||
Enum classes | ||
~~~~~~~~~~~~ | ||
.. onedal_enumclass:: oneapi::dal::preview::subgraph_isomorphism::kind | ||
|
||
.. _subgraph_isomorphism_t_api: | ||
|
||
Computing :cpp:expr:`preview::graph_matching(...)` | ||
-------------------------------------------------- | ||
|
||
.. _subgraph_isomorphism_t_api_input: | ||
|
||
Input | ||
~~~~~ | ||
.. onedal_class:: oneapi::dal::preview::subgraph_isomorphism::graph_matching_input | ||
|
||
.. _subgraph_isomorphism_t_api_result: | ||
|
||
Result | ||
~~~~~~ | ||
.. onedal_class:: oneapi::dal::preview::subgraph_isomorphism::graph_matching_result | ||
|
||
Operation | ||
~~~~~~~~~ | ||
|
||
.. function:: template <typename Graph, typename Descriptor> \ | ||
subgraph_isomorphism::graph_matching_result preview::graph_matching( \ | ||
const Descriptor& desc, \ | ||
const Graph& target, \ | ||
const Graph& pattern) | ||
|
||
:param desc: Subgraph Isomorphism algorithm descriptor :expr:`subgraph_isomorphism::descriptor` | ||
:param target: Target (big) graph | ||
:param pattern: Pattern (small) graph | ||
|
||
-------- | ||
Examples | ||
-------- | ||
|
||
.. include:: ../../../includes/graph/subgraph-isomorphism-examples.rst |
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
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
23 changes: 23 additions & 0 deletions
23
docs/source/includes/graph/subgraph-isomorphism-examples.rst
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 @@ | ||
.. ****************************************************************************** | ||
.. * Copyright 2020-2021 Intel Corporation | ||
.. * | ||
.. * 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. | ||
.. *******************************************************************************/ | ||
.. tabs:: | ||
|
||
.. group-tab:: oneAPI C++ | ||
|
||
Batch Processing: | ||
|
||
- :ref:`cpp_subgraph_isomorphism_batch.cpp` |
31 changes: 31 additions & 0 deletions
31
docs/source/includes/graph/subgraph-isomorphism-introduction.rst
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,31 @@ | ||
.. ****************************************************************************** | ||
.. * Copyright 2021 Intel Corporation | ||
.. * | ||
.. * 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. | ||
.. *******************************************************************************/ | ||
Subgraph Isomorphism algorithm receives a target graph :math:`G` and a pattern graph :math:`H` as input | ||
and searches the target graph for subgraphs that are isomorphic to the pattern graph. The algorithm returns | ||
the mappings of the pattern graph vertices onto the target graph vertices. | ||
|
||
.. |si_compute| replace:: :ref:`Computing <subgraph_isomorphism_compute>` | ||
.. |si_fast| replace:: :ref:`fast <subgraph_isomorphism_fast>` | ||
.. |si_api| replace:: :ref:`graph_matching(...) <subgraph_isomorphism_t_api>` | ||
.. |si_api_input| replace:: :ref:`graph_matching_input <subgraph_isomorphism_t_api_input>` | ||
.. |si_api_result| replace:: :ref:`graph_matching_result <subgraph_isomorphism_t_api_result>` | ||
|
||
================ =========================== ============ ================= ================= | ||
**Operation** **Computational methods** **Programming Interface** | ||
---------------- --------------------------- ------------------------------------------------ | ||
|si_compute| |si_fast| |si_api| |si_api_input| |si_api_result| | ||
================ =========================== ============ ================= ================= |
Binary file added
BIN
+48.9 KB
docs/source/onedal/algorithms/graph/images/subgraph-isomorphism-target-pattern.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.