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