Skip to content

Commit

Permalink
js/clone.js: .getNumberNonZeroSamples()
Browse files Browse the repository at this point in the history
  • Loading branch information
magiraud committed Sep 23, 2016
1 parent 81f7c1d commit 46bdd3d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions browser/js/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,22 @@ Clone.prototype = {
if (result == 0) return undefined;
return result;
},

/**
* compute the number of (displayed) samples in which this clone has a non-zero size
* @return {integer} number
* */
getNumberNonZeroSamples: function () {

var nb = 0;

for (var i in this.m.samples.order)
if (this.getReads(this.m.samples.order[i]) > 0)
nb += 1

return nb;

},

/**
* return the biggest size a clone can reach in the current samples
Expand Down

0 comments on commit 46bdd3d

Please sign in to comment.