src/snac/server/identityReconciliation/weights/SameAsStaticWeight.php
/**
     * Implements the compute method in the weight interface.
     *
     * @param array $vector Array of weights
     * @return float Computed weight of the vector. In this case, the sum of entries.
     */
Implements the compute method in the weight interface.
@param array $vector Array of weights
@return float Computed weight of the vector. In this case, the sum of entries.
Implements the compute method in the weight interface . @param array $vector Array of weights @return float Computed weight of the vector . In this case the sum of entries .
public function compute($vector) {
        foreach ($vector as $k => $v) {
            if ($k == "SameAs" && $v == 100)
                return 100;
        }
        $sum = 0;
        foreach ($vector as $entry)
            $sum = $sum + $entry;
        return $sum;
    }
public function compute ( $ vector ) { foreach ( $ vector as $ k => $ v ) { if ( $ k == " SameAs " && $ v == 100 ) return 100 ; } $ sum = 0 ; foreach ( $ vector as $ entry ) $ sum = $ sum + $ entry ; return $ sum ; }
Implements the compute method in the weight interface.
Implements the compute method in the weight interface .
// Return a full 100 score if this matched on sameas