Test fixes and rebase conflicts
This commit is contained in:
parent
fe3ab21054
commit
6b09eb8e17
@ -90,7 +90,7 @@ static HOMO_SAPIENS: [AminoAcid;4] = [
|
||||
fn sum_and_scale(a: &'static [AminoAcid]) -> Vec<AminoAcid> {
|
||||
let mut p = 0f32;
|
||||
let mut result: Vec<AminoAcid> = a.iter().map(|a_i| {
|
||||
p += a_i.p;
|
||||
p += a_i.p;
|
||||
AminoAcid { c: a_i.c, p: p * LOOKUP_SCALE }
|
||||
}).collect();
|
||||
let result_len = result.len();
|
||||
@ -179,7 +179,7 @@ impl<'a, W: Write> RandomFasta<'a, W> {
|
||||
fn nextc(&mut self) -> u8 {
|
||||
let r = self.rng(LOOKUP_SCALE);
|
||||
for i in (r as usize..LOOKUP_SIZE) {
|
||||
if self.lookup[i].p >= r {
|
||||
if self.lookup[i].p >= r {
|
||||
return self.lookup[i].c;
|
||||
}
|
||||
}
|
||||
@ -212,7 +212,7 @@ fn main() {
|
||||
} else {
|
||||
5
|
||||
};
|
||||
|
||||
|
||||
let stdout = io::stdout();
|
||||
let mut out = stdout.lock();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user