debug
This commit is contained in:
		| @@ -0,0 +1,15 @@ | ||||
| ## public Result::getBuildTimeStamp | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getBuildTimeStamp ( ): float | ||||
| ``` | ||||
|  | ||||
| Get the timestamp of this result. | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```float```)* Microsecond timestamp. | ||||
|  | ||||
| @@ -0,0 +1,21 @@ | ||||
| ## public Result::getClassGenerator | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getClassGenerator ( ): string | ||||
| ``` | ||||
|  | ||||
| Get the The algorithmic method used for this result. | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```string```)* Method class path like CondorcetPHP\Condorcet\Algo\Methods\Copeland | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Result::getMethod](../Result%20Class/public%20Result--getMethod.md)     | ||||
| @@ -0,0 +1,15 @@ | ||||
| ## public Result::getCondorcetElectionGeneratorVersion | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getCondorcetElectionGeneratorVersion ( ): string | ||||
| ``` | ||||
|  | ||||
| Get the Condorcet PHP version that build this Result. | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```string```)* Condorcet PHP version string format. | ||||
|  | ||||
| @@ -0,0 +1,22 @@ | ||||
| ## public Result::getCondorcetLoser | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getCondorcetLoser ( ): ?CondorcetPHP\Condorcet\Candidate | ||||
| ``` | ||||
|  | ||||
| Get the Condorcet loser, if exist, at the result time. | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```?CondorcetPHP\Condorcet\Candidate```)* Condorcet/Candidate object if there is a Condorcet loser or NULL instead. | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Result::getCondorcetWinner](../Result%20Class/public%20Result--getCondorcetWinner.md)     | ||||
| * [Election::getLoser](../Election%20Class/public%20Election--getLoser.md)     | ||||
| @@ -0,0 +1,22 @@ | ||||
| ## public Result::getCondorcetWinner | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getCondorcetWinner ( ): ?CondorcetPHP\Condorcet\Candidate | ||||
| ``` | ||||
|  | ||||
| Get the Condorcet winner, if exist, at the result time. | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```?CondorcetPHP\Condorcet\Candidate```)* CondorcetPHP\Condorcet\Candidate object if there is a Condorcet winner or NULL instead. | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Result::getCondorcetLoser](../Result%20Class/public%20Result--getCondorcetLoser.md)     | ||||
| * [Election::getWinner](../Election%20Class/public%20Election--getWinner.md)     | ||||
| @@ -0,0 +1,23 @@ | ||||
| ## public Result::getLoser | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getLoser ( ): CondorcetPHP\Condorcet\Candidate|array|null | ||||
| ``` | ||||
|  | ||||
| Equivalent to [Condorcet/Election::getWinner($method)](../Election Class/public Election--getWinner.md). | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```CondorcetPHP\Condorcet\Candidate|array|null```)* Candidate object given. Null if there are no available loser. | ||||
| You can get an array with multiples losers. | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Result::getWinner](../Result%20Class/public%20Result--getWinner.md)     | ||||
| * [Election::getLoser](../Election%20Class/public%20Election--getLoser.md)     | ||||
| @@ -0,0 +1,21 @@ | ||||
| ## public Result::getMethod | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getMethod ( ): string | ||||
| ``` | ||||
|  | ||||
| Get the The algorithmic method used for this result. | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```string```)* Method name. | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Result::getClassGenerator](../Result%20Class/public%20Result--getClassGenerator.md)     | ||||
| @@ -0,0 +1,21 @@ | ||||
| ## public Result::getMethodOptions | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getMethodOptions ( ): array | ||||
| ``` | ||||
|  | ||||
| Return the method options. | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```array```)* Array of options. Can be empty for most of the methods. | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Result::getClassGenerator](../Result%20Class/public%20Result--getClassGenerator.md)     | ||||
| @@ -0,0 +1,22 @@ | ||||
| ## public Result::getNumberOfSeats | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getNumberOfSeats ( ): ?int | ||||
| ``` | ||||
|  | ||||
| Get number of Seats for STV methods result. | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```?int```)* Number of seats if this result is a STV method. Else NULL. | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Election::setNumberOfSeats](../Election%20Class/public%20Election--setNumberOfSeats.md)     | ||||
| * [Election::getNumberOfSeats](../Election%20Class/public%20Election--getNumberOfSeats.md)     | ||||
| @@ -0,0 +1,25 @@ | ||||
| ## public Result::getObjectVersion | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getObjectVersion ( [bool $major = false] ): string | ||||
| ``` | ||||
|  | ||||
| Get the Condorcet PHP version who built this Election object. Usefull pour serializing Election. | ||||
|      | ||||
|  | ||||
| ##### **major:** *```bool```*    | ||||
| true will return : '2.0' and false will return : '2.0.0'.     | ||||
|  | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```string```)* Condorcet PHP version. | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [static Condorcet::getVersion](../Condorcet%20Class/public%20static%20Condorcet--getVersion.md)     | ||||
| @@ -0,0 +1,25 @@ | ||||
| ## public Result::getOriginalResultArrayWithString | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getOriginalResultArrayWithString ( ): array | ||||
| ``` | ||||
|  | ||||
| Get result as an array | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```array```)* Unlike other methods to recover the result. This is frozen as soon as the original creation of the Result object is created. | ||||
| Candidate objects are therefore protected from any change of candidateName, since the candidate objects are converted into a string when the results are promulgated. | ||||
|  | ||||
| This control method can therefore be useful if you undertake suspicious operations on candidate objects after the results have been promulgated. | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Result::getResultAsArray](../Result%20Class/public%20Result--getResultAsArray.md)     | ||||
| * [Result::getResultAsString](../Result%20Class/public%20Result--getResultAsString.md)     | ||||
| @@ -0,0 +1,26 @@ | ||||
| ## public Result::getResultAsArray | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getResultAsArray ( [bool $convertToString = false] ): array | ||||
| ``` | ||||
|  | ||||
| Get result as an array | ||||
|      | ||||
|  | ||||
| ##### **convertToString:** *```bool```*    | ||||
| Convert Candidate object to string.     | ||||
|  | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```array```)* An ordered multidimensionnal array by rank. | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Election::getResult](../Election%20Class/public%20Election--getResult.md)     | ||||
| * [Result::getResultAsString](../Result%20Class/public%20Result--getResultAsString.md)     | ||||
| @@ -0,0 +1,22 @@ | ||||
| ## public Result::getResultAsString | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getResultAsString ( ): string | ||||
| ``` | ||||
|  | ||||
| Get result as string | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```string```)* Result ranking as string. | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Election::getResult](../Election%20Class/public%20Election--getResult.md)     | ||||
| * [Result::getResultAsArray](../Result%20Class/public%20Result--getResultAsArray.md)     | ||||
| @@ -0,0 +1,27 @@ | ||||
| ## public Result::getStats | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getStats ( ): mixed | ||||
| ``` | ||||
|  | ||||
| Get advanced computing data from used algorithm. Like Strongest paths for Schulze method. | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```mixed```)* Varying according to the algorithm used. | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Election::getResult](../Election%20Class/public%20Election--getResult.md)     | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Examples and explanation | ||||
|  | ||||
| * **[Advanced Result Management](https://github.com/julien-boudry/Condorcet/wiki/II-%23-C.-Result-%23-3.-Advanced-Results-Management)**     | ||||
| @@ -0,0 +1,19 @@ | ||||
| ## public Result::getWarning | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getWarning ( [?int $type = null] ): array | ||||
| ``` | ||||
|  | ||||
| From native methods: only Kemeny-Young use it to inform about a conflict during the computation process. | ||||
|      | ||||
|  | ||||
| ##### **type:** *```?int```*    | ||||
| Filter on a specific warning type code.     | ||||
|  | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```array```)* Warnings provided by the by the method that generated the warning. Empty array if there is not. | ||||
|  | ||||
| @@ -0,0 +1,23 @@ | ||||
| ## public Result::getWinner | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->getWinner ( ): CondorcetPHP\Condorcet\Candidate|array|null | ||||
| ``` | ||||
|  | ||||
| Equivalent to [Condorcet/Election::getWinner($method)](../Election Class/public Election--getWinner.md). | ||||
|      | ||||
|  | ||||
| ### Return value:    | ||||
|  | ||||
| *(```CondorcetPHP\Condorcet\Candidate|array|null```)* Candidate object given. Null if there are no available winner. | ||||
| You can get an array with multiples winners. | ||||
|  | ||||
|  | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Result::getLoser](../Result%20Class/public%20Result--getLoser.md)     | ||||
| * [Election::getWinner](../Election%20Class/public%20Election--getWinner.md)     | ||||
| @@ -0,0 +1,15 @@ | ||||
| ## public Result::isProportional | ||||
|  | ||||
| ### Description     | ||||
|  | ||||
| ```php | ||||
| public Result->isProportional ( ): bool | ||||
| ``` | ||||
|  | ||||
| Does the result come from a proportional method | ||||
|      | ||||
| --------------------------------------- | ||||
|  | ||||
| ### Related method(s)       | ||||
|  | ||||
| * [Result::getNumberOfSeats](../Result%20Class/public%20Result--getNumberOfSeats.md)     | ||||
		Reference in New Issue
	
	Block a user