Branch Coverage

blib/lib/Lingua/YaTeA/NodeSet.pm
Criterion Covered Total %
branch 15 98 15.3


line true false branch
43 606 94 if (&blessed($node) and $node->isa('Lingua::YaTeA::RootNode'))
78 0 710 if (scalar @{$this->getNodes;} == 0) { }
84 326 384 if (not defined $this->getRoot && exists $nodes_id{$this->getRoot->getID} or &blessed(scalar $this->getRoot) and not $this->getRoot->isa('Lingua::YaTeA::RootNode'))
121 4 267 if (&blessed($node) and $node->isa('Lingua::YaTeA::RootNode') and $node ne $this->getRoot)
161 81 138 if (&blessed($node) and $node->isa('Lingua::YaTeA::RootNode'))
182 0 0 if ($node->getID == $root_node->getID) { }
184 0 0 if (&blessed($node) and $node->isa('Lingua::YaTeA::InternalNode'))
186 0 0 if (&blessed(scalar $node->getFather->getLeftEdge) and ($node->getFather->getLeftEdge->isa('Lingua::YaTeA::InternalNode') and $node->getFather->getLeftEdge->getID == $node->getID)) { }
198 0 0 if (&blessed(scalar $node->getFather->getRightEdge) and ($node->getFather->getRightEdge->isa('Lingua::YaTeA::InternalNode') and $node->getFather->getRightEdge->getID == $node->getID))
210 0 0 if (&blessed(scalar $node->getLeftEdge) and $node->getLeftEdge->isa('Lingua::YaTeA::Node'))
216 0 0 if ($node->getLeftEdge->isDiscontinuous(\$previous, $words_a, $fh)->[0] == -1)
223 0 0 if (&blessed(scalar $node->getRightEdge) and $node->getRightEdge->isa('Lingua::YaTeA::Node'))
230 0 0 if ($node->getRightEdge->isDiscontinuous(\$previous, $words_a, $fh)->[0] == -1)
262 0 0 if (scalar @$free_nodes_a != 0)
267 0 0 if ($node != $added_node_set->getNode(0)->searchRoot and not exists $integrated{$node->getID})
274 0 0 if ($added_index_set->getLast == $pivot) { }
280 0 0 if ($added_index_set->getFirst == $pivot)
286 0 0 if (&blessed($hook_node) and $hook_node->isa('Lingua::YaTeA::Node'))
288 0 0 if ($hook_node->hitch($hook_place, $added_node_set->getRoot, $words_a))
314 0 0 if (&blessed($node) and $node->isa('Lingua::YaTeA::RootNode'))
318 0 0 if (&blessed($pivot_node) and $pivot_node->isa('Lingua::YaTeA::Node'))
329 0 0 if (defined $left_most and defined $right_most)
335 0 0 if ($right_most->getIndex == $added_index_set->getLast)
337 0 0 if ($left_most->getIndex > $added_index_set->getFirst)
342 0 0 if ($left_most->getIndex < $added_index_set->getFirst)
349 0 0 if ($right_most->getIndex == $added_index_set->getFirst)
355 0 0 if ($left_most->getIndex == $added_index_set->getLast)
358 0 0 if ($added_node_set->getRoot->searchHead(0)->getIndex == $left_most->getIndex) { }
369 0 0 if ($left_most->getIndex == $added_index_set->getFirst)
371 0 0 if ($right_most->getIndex > $added_index_set->getLast)
375 0 0 if ($right_most->getIndex < $added_index_set->getLast)
381 0 0 if ($left_most->getIndex > $added_index_set->getFirst)
383 0 0 if ($right_most->getIndex < $added_index_set->getLast) { }
396 0 0 if ($left_most->getIndex < $added_index_set->getFirst)
398 0 0 if ($right_most->getIndex > $added_index_set->getLast)
402 0 0 if ($recorded->searchHead(0)->getIndex == $pivot) { }
425 32 74 if (&blessed(scalar $node->getLeftEdge) and $node->getLeftEdge->isa('Lingua::YaTeA::TermLeaf') and $node->getLeftEdge->getIndex == $pivot)
435 29 45 if (&blessed(scalar $node->getRightEdge) and $node->getRightEdge->isa('Lingua::YaTeA::TermLeaf') and $node->getRightEdge->getIndex == $pivot)
467 0 0 if (scalar @{$this->getNodes;} != 0) { }
469 0 0 if (defined $fh) { }
471 0 0 if (defined $this->getRoot) { }
484 0 0 if (defined $this->getRoot) { }
498 0 0 if (defined $fh) { }
514 0 0 unless (defined $fh)
518 0 0 if (defined $this->getRoot) { }
542 45 0 if (defined $fh) { }
558 61 0 if (defined $node) { }
572 0 0 if (&blessed($node) and $node->isa('Lingua::YaTeA::RootNode'))
591 0 0 if (defined $root_head and (&blessed($root_head) and $root_head->isa('Lingua::YaTeA::TermLeaf')))