Commit 877b760f authored by Magali Ruffier's avatar Magali Ruffier
Browse files

store only if value if positive

parent fb8073dc
......@@ -50,7 +50,9 @@ sub run {
-end => $block->end,
-density_type => $density_type,
-density_value => $feature);
push(@features, $df);
if ($feature > 0) {
push(@features, $df);
}
}
} else {
my $feature = $self->get_density($slice, $option);
......@@ -60,7 +62,9 @@ sub run {
-end => $slice->end,
-density_type => $density_type,
-density_value => $feature);
push(@features, $df);
if ($feature > 0) {
push(@features, $df);
}
}
if ($count >= $total || $iteration == $max_run) {
last;
......
......@@ -26,7 +26,9 @@ sub run {
while (my $slice = shift @sorted_slices) {
foreach my $code (keys %attrib_codes) {
my $count = $self->get_feature_count($slice, $code, $attrib_codes{$code});
$self->store_attrib($slice, $count, $code);
if ($count > 0) {
$self->store_attrib($slice, $count, $code);
}
$sum += $count;
}
if ($sum >= $total) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment