Skip to content

Commit

Permalink
Merge pull request #16 from hardliner66/fix_formatting
Browse files Browse the repository at this point in the history
Fix formatting
  • Loading branch information
iMilchshake authored Aug 24, 2024
2 parents 35957a4 + 7338104 commit 9311ba3
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions src/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,34 +133,19 @@ impl Random {
pub fn sample_inner_kernel_size(&mut self) -> usize {
let dist = &self.inner_kernel_size_dist;
let index = dist.rnd_dist.sample(&mut self.gen);
*dist.rnd_cfg
.values
.as_ref()
.unwrap()
.get(index)
.unwrap()
*dist.rnd_cfg.values.as_ref().unwrap().get(index).unwrap()
}

pub fn sample_outer_kernel_margin(&mut self) -> usize {
let dist = &self.outer_kernel_margin_dist;
let index = dist.rnd_dist.sample(&mut self.gen);
*dist.rnd_cfg
.values
.as_ref()
.unwrap()
.get(index)
.unwrap()
*dist.rnd_cfg.values.as_ref().unwrap().get(index).unwrap()
}

pub fn sample_circularity(&mut self) -> f32 {
let dist = &self.circ_dist;
let index = dist.rnd_dist.sample(&mut self.gen);
*dist.rnd_cfg
.values
.as_ref()
.unwrap()
.get(index)
.unwrap()
*dist.rnd_cfg.values.as_ref().unwrap().get(index).unwrap()
}

pub fn sample_shift(&mut self, ordered_shifts: &[ShiftDirection; 4]) -> ShiftDirection {
Expand Down

0 comments on commit 9311ba3

Please sign in to comment.