mirror of
https://github.com/tig-pool-nk/tig-monorepo.git
synced 2026-02-21 15:37:44 +08:00
Add missing imports for hypergraph.
This commit is contained in:
parent
c4ed10deed
commit
610212081a
@ -9,3 +9,7 @@ pub use vehicle_routing as c002;
|
||||
pub mod vector_search;
|
||||
#[cfg(feature = "cuda")]
|
||||
pub use vector_search as c004;
|
||||
#[cfg(feature = "cuda")]
|
||||
pub mod hypergraph;
|
||||
#[cfg(feature = "cuda")]
|
||||
pub use hypergraph as c005;
|
||||
|
||||
@ -12,6 +12,20 @@ pub struct Difficulty {
|
||||
pub better_than_baseline: u32,
|
||||
}
|
||||
|
||||
impl From<Vec<i32>> for Difficulty {
|
||||
fn from(arr: Vec<i32>) -> Self {
|
||||
Self {
|
||||
num_hyperedges: arr[0] as u32,
|
||||
better_than_baseline: arr[1] as u32,
|
||||
}
|
||||
}
|
||||
}
|
||||
impl Into<Vec<i32>> for Difficulty {
|
||||
fn into(self) -> Vec<i32> {
|
||||
vec![self.num_hyperedges as i32, self.better_than_baseline as i32]
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct Solution {
|
||||
pub sub_solutions: Vec<SubSolution>,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user