Skip to content

Commit 3c77656

Browse files
committed
renormalizing custom rr profiles as done for built-in profiles (average = 1)
1 parent c980ef8 commit 3c77656

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sources/GTRProfileProcess.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,13 @@ void GTRProfileProcess::SetRR(string type) {
373373

374374
}
375375
}
376+
double total = 0;
377+
for (int i=0; i<Nrr; i++) {
378+
total += rr[i];
379+
}
380+
for (int i=0; i<Nrr; i++) {
381+
rr[i] /= total / Nrr;
382+
}
376383
}
377384
}
378385
}

0 commit comments

Comments
 (0)