no message

This commit is contained in:
2025-05-02 15:16:16 +02:00
parent 86bdd9c8d8
commit cfc3b5b7ca

View File

@@ -87,22 +87,23 @@ class Verbraucher_extern extends IPSModule
return array_values(array_unique($kombinationen));
}
private function findCombinationRecursive($power, $values, $currentCombination, $startIndex, &$result) {
if ($power == 0) {
$result = $currentCombination;
return true;
}
if ($power < 0) {
return false;
}
}
private function findCombination($power, $values) {
$result = [];
$found = findCombinationRecursive($power, $values, [], 0, $result);
$found = $this->findCombinationRecursive($power, $values, [], 0, $result);
return $found ? $result : null;
}
private function findCombinationRecursive($power, $values, $currentCombination, $startIndex, &$result) {
if ($power == 0) {
$result = $currentCombination;
return true;
}
if ($power < 0) {
return false;
}
}
private function find($target, $values, $current, &$result) {
if ($target == 0) {
$result[] = $current;