src/snac/server/identityReconciliation/stages/SNACDegree.php
/**
     * Run function
     *
     * Calculates the natural log of the original_string and returns it as a
     * global modifier to all results.
     *
     * @param \snac\data\Constellation $search The constellation to be evaluated.
     * @param \snac\data\ReconciliationResult[] $list A list of resultss to evaluate against.  This
     * may be null.
     * @return array
     *
     */
Run function
Calculates the natural log of the original_string and returns it as a
global modifier to all results.

@param \snac\data\Constellation $search The constellation to be evaluated.
@param \snac\data\ReconciliationResult[] $list A list of resultss to evaluate against.  This
may be null.
@return array
Run function Calculates the natural log of the original_string and returns it as a global modifier to all results . @param \ snac \ data \ Constellation $search The constellation to be evaluated . @param \ snac \ data \ ReconciliationResult [] $list A list of resultss to evaluate against . This may be null . @return array
public function run($search, $list) {
        $results = array();
        foreach ($list as $res) {
            $id = $res->getIdentity();
            $result = 0;
            $degree = $res->getProperty("degree");
            $resultDeg = 0;
            if ($degree != null && $degree > 0)
                $resultDeg = 5 * log($degree);
            if (is_nan($resultDeg) || is_infinite($resultDeg))
                $resultDeg = 0;
            $result = new \snac\data\ReconciliationResult();
            $result->setIdentity($id);
            $result->setStrength($resultDeg);
            array_push($results,$result);
        }
        return ($results);
    }
public function run ( $ search , $ list ) { $ results = array ( ) ; foreach ( $ list as $ res ) { $ id = $ res -> getIdentity ( ) ; $ result = 0 ; $ degree = $ res -> getProperty ( " degree " ) ; $ resultDeg = 0 ; if ( $ degree != null && $ degree > 0 ) $ resultDeg = 5 * log ( $ degree ) ; if ( is_nan ( $ resultDeg ) || is_infinite ( $ resultDeg ) ) $ resultDeg = 0 ; $ result = new \ snac \ data \ ReconciliationResult ( ) ; $ result -> setIdentity ( $ id ) ; $ result -> setStrength ( $ resultDeg ) ; array_push ( $ results , $ result ) ; } return ( $ results ) ; }
Run function
 Calculates the natural log of the original_string and returns it as a
 global modifier to all results.
Run function Calculates the natural log of the original_string and returns it as a global modifier to all results .