Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump ahash crate to fix build #46

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion benches/performance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use std::fmt::{Display, Formatter, Result};

use criterion::{criterion_group, criterion_main, Criterion};
use criterion::{Criterion, criterion_group, criterion_main};
use hypergraph::{HyperedgeIndex, Hypergraph, VertexIndex};
use itertools::Itertools;

Expand Down
4 changes: 2 additions & 2 deletions src/core/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ where
V: Copy + Eq,
HE: Copy + Eq,
{
/// Error when a HyperedgeIndex was not found.
/// Error when a `HyperedgeIndex` was not found.
#[error("HyperedgeIndex {0} was not found")]
HyperedgeIndexNotFound(HyperedgeIndex),

Expand Down Expand Up @@ -66,7 +66,7 @@ where
#[error("At least two hyperedges must be provided to be joined")]
HyperedgesInvalidJoin,

/// Error when a VertexIndex was not found.
/// Error when a `VertexIndex` was not found.
#[error("VertexIndex {0} was not found")]
VertexIndexNotFound(VertexIndex),

Expand Down
4 changes: 2 additions & 2 deletions src/core/hyperedges/add_hyperedge.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
errors::HypergraphError, HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex,
VertexTrait,
HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
2 changes: 1 addition & 1 deletion src/core/hyperedges/clear_hyperedges.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use rayon::prelude::*;

use crate::{
bi_hash_map::BiHashMap, errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexTrait,
HyperedgeTrait, Hypergraph, VertexTrait, bi_hash_map::BiHashMap, errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
4 changes: 2 additions & 2 deletions src/core/hyperedges/contract_hyperedge_vertices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use itertools::Itertools;
use rayon::prelude::*;

use crate::{
core::utils::are_slices_equal, errors::HypergraphError, HyperedgeIndex, HyperedgeTrait,
Hypergraph, VertexIndex, VertexTrait,
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
core::utils::are_slices_equal, errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
2 changes: 1 addition & 1 deletion src/core/hyperedges/get_hyperedge.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait};
use crate::{HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};

impl<V, HE> Hypergraph<V, HE>
where
Expand Down
4 changes: 2 additions & 2 deletions src/core/hyperedges/get_hyperedge_vertices.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
errors::HypergraphError, HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex,
VertexTrait,
HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
2 changes: 1 addition & 1 deletion src/core/hyperedges/get_hyperedge_weight.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait};
use crate::{HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};

impl<V, HE> Hypergraph<V, HE>
where
Expand Down
2 changes: 1 addition & 1 deletion src/core/hyperedges/get_hyperedges.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rayon::prelude::*;

use crate::{errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait};
use crate::{HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};

impl<V, HE> Hypergraph<V, HE>
where
Expand Down
4 changes: 2 additions & 2 deletions src/core/hyperedges/get_hyperedges_connecting.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use rayon::prelude::*;

use crate::{
core::shared::Connection, errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph,
VertexIndex, VertexTrait,
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
7 changes: 3 additions & 4 deletions src/core/hyperedges/get_hyperedges_intersections.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use itertools::Itertools;
use rayon::prelude::*;

use crate::{
errors::HypergraphError, HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex,
VertexTrait,
HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand All @@ -26,7 +25,7 @@ where

// Get the internal vertices of the hyperedges and keep the eventual error.
let vertices = hyperedges
.into_par_iter()
.into_iter()
.map(|hyperedge_index| {
self.get_internal_hyperedge(hyperedge_index)
.and_then(|internal_index| {
Expand Down
2 changes: 1 addition & 1 deletion src/core/hyperedges/get_internal_hyperedge.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait};
use crate::{HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};

impl<V, HE> Hypergraph<V, HE>
where
Expand Down
2 changes: 1 addition & 1 deletion src/core/hyperedges/get_internal_hyperedges.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait};
use crate::{HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};

impl<V, HE> Hypergraph<V, HE>
where
Expand Down
2 changes: 1 addition & 1 deletion src/core/hyperedges/join_hyperedges.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use rayon::prelude::*;

use crate::{
errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
2 changes: 1 addition & 1 deletion src/core/hyperedges/remove_hyperedge.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
errors::HypergraphError, HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexTrait,
HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
2 changes: 1 addition & 1 deletion src/core/hyperedges/reverse_hyperedge.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rayon::prelude::*;

use crate::{errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait};
use crate::{HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};

impl<V, HE> Hypergraph<V, HE>
where
Expand Down
4 changes: 2 additions & 2 deletions src/core/hyperedges/update_hyperedge_vertices.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use rayon::prelude::*;

use crate::{
core::utils::are_slices_equal, errors::HypergraphError, HyperedgeIndex, HyperedgeKey,
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
core::utils::are_slices_equal, errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
2 changes: 1 addition & 1 deletion src/core/hyperedges/update_hyperedge_weight.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
errors::HypergraphError, HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexTrait,
HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
2 changes: 1 addition & 1 deletion src/core/iterator.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rayon::prelude::*;

use crate::{errors::HypergraphError, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexTrait};
use crate::{HyperedgeKey, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};

impl<V, HE> IntoIterator for Hypergraph<V, HE>
where
Expand Down
2 changes: 1 addition & 1 deletion src/core/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use itertools::Itertools;
use rayon::prelude::*;

use crate::{
errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError,
};

/// Enumeration of the different types of connection.
Expand Down
2 changes: 1 addition & 1 deletion src/core/vertices/add_vertex.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
core::types::{AIndexSet, ARandomState},
errors::HypergraphError,
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
4 changes: 2 additions & 2 deletions src/core/vertices/get_adjacent_vertices_from.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use rayon::prelude::*;

use crate::{
core::shared::Connection, errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex,
VertexTrait,
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
4 changes: 2 additions & 2 deletions src/core/vertices/get_adjacent_vertices_to.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use rayon::prelude::*;

use crate::{
core::shared::Connection, errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex,
VertexTrait,
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
2 changes: 1 addition & 1 deletion src/core/vertices/get_dijkstra_connections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
use rayon::prelude::*;

use crate::{
errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError,
};

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
Expand Down
6 changes: 3 additions & 3 deletions src/core/vertices/get_full_adjacent_vertices_from.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use indexmap::IndexMap;
use itertools::{fold, Itertools};
use itertools::{Itertools, fold};

use crate::{
core::shared::Connection, errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph,
VertexIndex, VertexTrait,
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
errors::HypergraphError,
};

#[allow(clippy::type_complexity)]
Expand Down
6 changes: 3 additions & 3 deletions src/core/vertices/get_full_adjacent_vertices_to.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use indexmap::IndexMap;
use itertools::{fold, Itertools};
use itertools::{Itertools, fold};

use crate::{
core::shared::Connection, errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph,
VertexIndex, VertexTrait,
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
errors::HypergraphError,
};

#[allow(clippy::type_complexity)]
Expand Down
2 changes: 1 addition & 1 deletion src/core/vertices/get_full_vertex_hyperedges.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rayon::prelude::*;

use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};

impl<V, HE> Hypergraph<V, HE>
where
Expand Down
2 changes: 1 addition & 1 deletion src/core/vertices/get_internal_vertex.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};

impl<V, HE> Hypergraph<V, HE>
where
Expand Down
2 changes: 1 addition & 1 deletion src/core/vertices/get_internal_vertices.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rayon::prelude::*;

use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};

impl<V, HE> Hypergraph<V, HE>
where
Expand Down
2 changes: 1 addition & 1 deletion src/core/vertices/get_vertex.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};

impl<V, HE> Hypergraph<V, HE>
where
Expand Down
4 changes: 2 additions & 2 deletions src/core/vertices/get_vertex_degree_in.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
core::shared::Connection, errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex,
VertexTrait,
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
4 changes: 2 additions & 2 deletions src/core/vertices/get_vertex_degree_out.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
core::shared::Connection, errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex,
VertexTrait,
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
2 changes: 1 addition & 1 deletion src/core/vertices/get_vertex_hyperedges.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use itertools::Itertools;

use crate::{
errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError,
};

impl<V, HE> Hypergraph<V, HE>
Expand Down
2 changes: 1 addition & 1 deletion src/core/vertices/get_vertex_weight.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};

impl<V, HE> Hypergraph<V, HE>
where
Expand Down
2 changes: 1 addition & 1 deletion src/core/vertices/get_vertices.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rayon::prelude::*;

use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};

impl<V, HE> Hypergraph<V, HE>
where
Expand Down
Loading