Skip to content

Commit

Permalink
Fix issue #7 (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
inthar-raven committed Sep 9, 2024
1 parent 21887f2 commit bc8358a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ fn get_unimodular_basis(
for i in 0..gs.clone().len() {
for j in i..gs.clone().len() {
if det3(step_sig, &gs[i], &gs[j]).abs() == 1 {
console_log!("first branch");
return Some((vec![gs[i].clone(), gs[j].clone()], structure));
}
}
Expand All @@ -280,6 +281,7 @@ fn get_unimodular_basis(
for v in polyoffset {
for w in structure.clone().gs {
if det3(step_sig, &v, &w).abs() == 1 {
console_log!("second branch");
return Some((vec![v, w], structure));
}
}
Expand All @@ -295,11 +297,14 @@ fn get_unimodular_basis(
))
.iter()
.map(|x| *x as u8)
.collect();
return Some((
vec![vec_for_gs_element, vec_for_detempered_period],
structure,
));
.collect::<Vec<_>>();
if det3(step_sig, &vec_for_gs_element, &vec_for_detempered_period) == 1 {
console_log!("third branch");
return Some((
vec![vec_for_gs_element, vec_for_detempered_period],
structure,
));
}
}
}
None
Expand Down

0 comments on commit bc8358a

Please sign in to comment.