TreemapNode::compareChildren PHP Méthode

compareChildren() public méthode

Comparator method to rank child nodes by total weight.
public compareChildren ( $a, $b )
    public function compareChildren($a, $b)
    {
        if ($this->_children[$a]->getTotalSize() > $this->_children[$b]->getTotalSize()) {
            $node_a = $this->_children[$a];
            $node_b = $this->_children[$b];
            $this->_children[$a] = $node_b;
            $this->_children[$b] = $node_a;
        }
    }