Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
10 / 10 |
Subheap | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
3 | |
100.00% |
10 / 10 |
__construct($data, $tag, $subheaps = null, Subheap $parent = null) | |
100.00% |
1 / 1 |
3 | |
100.00% |
10 / 10 |
<?php namespace SEIDS\Heaps\Pairing; | |
//============================================================================== | |
// PHP SEIDS: Supplementary, Easily Interchangeable Data Structures | |
// | |
// Copyright 2015, Daniel A.C. Martin | |
// Distributed under the MIT License. | |
// (See LICENSE file for details.) | |
//============================================================================== | |
class Subheap | |
{ | |
public $data; // mixed | |
public $tag; // int | |
public $parent = null; // &Subheap | |
public $subheaps = array(); // Array(&Subheap) | |
public function __construct($data, $tag, $subheaps = null, Subheap $parent = null) | |
{ | |
$this->data = $data; | |
$this->tag = $tag; | |
$this->parent = $parent; | |
if | |
( | |
($subheaps !== null) | |
&& (is_array($subheaps)) | |
) | |
{ | |
$this->subheaps = $subheaps; | |
} | |
} | |
} |