Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class SimpleWeightedGraph extends SimpleGraph |
||
15 | { |
||
16 | /** |
||
17 | * Create a new simple graph |
||
18 | * |
||
19 | * @param string $edgeClass - the edge class |
||
20 | * @param SupplierInterface $vertexSupplier - the vertex supplier |
||
21 | * @param SupplierInterface $edgeSupplier - the edge supplier |
||
22 | * @param bool $weighted - if the graph is weighted |
||
23 | */ |
||
24 | public function __construct( |
||
25 | 1 | ?string $edgeClass = null, |
|
26 | ?SupplierInterface $vertexSupplier = null, |
||
27 | ?SupplierInterface $edgeSupplier = null, |
||
28 | ?bool $weighted = null |
||
29 | ) { |
||
30 | parent::__construct( |
||
31 | 1 | $edgeClass, |
|
32 | 1 | $vertexSupplier, |
|
33 | 1 | $edgeSupplier, |
|
34 | 1 | true |
|
35 | 1 | ); |
|
36 | } |
||
37 | 1 | ||
38 | /** |
||
39 | * Create a simple graph builder |
||
40 | * |
||
41 | * @param string $edgeClass - the edge class |
||
42 | * @param SupplierInterface $edgeSupplier - the edge supplier |
||
43 | * |
||
44 | * @return GraphBuilder |
||
45 | */ |
||
46 | public function createBuilder(?string $edgeClass = null, ?SupplierInterface $edgeSupplier = null): GraphBuilder |
||
52 | } |
||
53 | } |
||
54 |