PHP code example of webd / aggregation

1. Go to this page and download the library: Download webd/aggregation library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webd / aggregation example snippets




use Aggregation\WOWA;

$w = array(0.1, 0.2, 0.3, 0.4, 0.0);
$p = array(0.1, 0.2, 0.3, 0.4, 0.0);
$values = array(0.4, 0.2, 0.3, 0.1, 0.0);
echo WOWA::wowa($w, $p, $values);