Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenTrokeBillard committed Sep 17, 2024
1 parent 54997dd commit 9b9232d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,22 @@ the data subgraph must also exist in the query graph.

# Usage

Add `vf2` to your dependencies in **Cargo.toml**.

```toml
[dependencies]
vf2 = "1.0"
```

Create your query and data graphs with [petgraph](https://github.com/petgraph/petgraph)
or any library that implements the `Graph` trait. Then, call one of the following
functions based on the problem type.

| Problem type | Call |
|-------------------------------|---------------------------------|
| Graph isomorphisms | `isomorphisms` |
| Subgraph isomorphisms | `subgraph_isomorphisms` |
| Induced subgraph isomorphisms | `induced_subgraph_isomorphisms` |
| Problem type | Call |
|-------------------------------|--------------------------------------|
| Graph isomorphisms | `vf2::isomorphisms` |
| Subgraph isomorphisms | `vf2::subgraph_isomorphisms` |
| Induced subgraph isomorphisms | `vf2::induced_subgraph_isomorphisms` |

These return a `Vf2Builder` with the algorithm configured.
Next, call one of the following on the builder to enumerate the isomorphisms.
Expand Down
17 changes: 12 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,22 @@
//!
//! # Usage
//!
//! Add `vf2` to your dependencies in **Cargo.toml**.
//!
//! ```toml
//! [dependencies]
//! vf2 = "1.0"
//! ```
//!
//! Create your query and data graphs with [petgraph](https://github.com/petgraph/petgraph)
//! or any library that implements the [`Graph`] trait. Then, call one of the following
//! functions based on the problem type.
//!
//! | Problem type | Call |
//! |-------------------------------|-----------------------------------|
//! | Graph isomorphisms | [`isomorphisms`] |
//! | Subgraph isomorphisms | [`subgraph_isomorphisms`] |
//! | Induced subgraph isomorphisms | [`induced_subgraph_isomorphisms`] |
//! | Problem type | Call |
//! |-------------------------------|-----------------------------------------------------------------------|
//! | Graph isomorphisms | [`vf2::isomorphisms`](isomorphisms) |
//! | Subgraph isomorphisms | [`vf2::subgraph_isomorphisms`](subgraph_isomorphisms) |
//! | Induced subgraph isomorphisms | [`vf2::induced_subgraph_isomorphisms`](induced_subgraph_isomorphisms) |
//!
//! \
//! These return a [`Vf2Builder`] with the algorithm configured.
Expand Down

0 comments on commit 9b9232d

Please sign in to comment.