diff --git a/methods/schulzeResults.php b/methods/schulzeResults.php index 69e7f1a..93d9571 100644 --- a/methods/schulzeResults.php +++ b/methods/schulzeResults.php @@ -14,20 +14,6 @@ class schulze array(5, 3, 2, 4, 1), ); - function matrix() - { - foreach($nvotes as $votes) - { - for ($i=1;$i<=$votes;$i++) - { - for ($j=1;$j<=$ncandidats;$j++) - { - void; - } - } - } - } - function stringify($votes) { $r = array(); @@ -47,7 +33,14 @@ class schulze } } - function test($v) + function callBack($votes) + { + $mvotes = $this->matrix($votes); + $rvotes = $this->result($mvotes); + print_r($p); + } + + function matrix($v) { $w = array(); $i = 0; @@ -79,9 +72,10 @@ class schulze } $w = $this->votify($w); print_r($w); + return $w; } - function result() + function result($v) { for ($i=1;$i<=$ncandidats;$i++) { @@ -108,8 +102,8 @@ class schulze } } } - return $p; } + return $p; } } ?>