MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / round_by_ploidy

Function round_by_ploidy

src/myFunc.cpp:1333–1337  ·  view source on GitHub ↗

find closest value to k/ploidy for medianValue

Source from the content-addressed store, hash-verified

1331
1332//find closest value to k/ploidy for medianValue
1333float round_by_ploidy(float value, int ploidy) {
1334 if (value >0)
1335 return float(int(value*ploidy + 0.5))/ploidy;
1336 return float(int(value*ploidy))/ploidy;
1337}
1338
1339int round_f(float r) {
1340 return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);

Callers 7

getSegmentsInfoMethod · 0.85
printRatioBedGraphMethod · 0.85
printRatioMethod · 0.85
calculateSDAndMedMethod · 0.85
calculateSDsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected