Total Complexity | 2 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | class WeightedEdgeSpecifics extends UniformEdgeSpecifics |
||
14 | { |
||
15 | /** |
||
16 | * Get the edge weight |
||
17 | * |
||
18 | * @param EdgeInterface $edge - the edge |
||
19 | * |
||
20 | * @return null|float |
||
21 | */ |
||
22 | 8 | public function getEdgeWeight(EdgeInterface $edge): ?float |
|
23 | { |
||
24 | 8 | return $edge->getWeight(); |
|
|
|||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Set the edge weight |
||
29 | * |
||
30 | * @param EdgeInterface $edge - the edge |
||
31 | * @param float $weight - the weight |
||
32 | */ |
||
33 | 9 | public function setEdgeWeight(EdgeInterface $edge, ?float $weight = null): void |
|
36 | 9 | } |
|
37 | } |
||
38 |