no message
This commit is contained in:
@@ -87,22 +87,23 @@ class Verbraucher_extern extends IPSModule
|
|||||||
return array_values(array_unique($kombinationen));
|
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) {
|
private function findCombination($power, $values) {
|
||||||
$result = [];
|
$result = [];
|
||||||
$found = findCombinationRecursive($power, $values, [], 0, $result);
|
$found = $this->findCombinationRecursive($power, $values, [], 0, $result);
|
||||||
return $found ? $result : null;
|
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) {
|
private function find($target, $values, $current, &$result) {
|
||||||
if ($target == 0) {
|
if ($target == 0) {
|
||||||
$result[] = $current;
|
$result[] = $current;
|
||||||
|
|||||||
Reference in New Issue
Block a user