/** * Returns the hashcode for the specified object. * * @param object IObject $obj The object to be hashed. * @return integer The hash code. */ protected function f(IObject $obj) { return $obj->getHashCode(); }
/** * Visits the given object. * * @param object IObject $w An object. */ public function visit(IObject $v) { $min = $this->latestTime[$this->latestTime->getLength() - 1]; foreach ($v->getEmanatingEdges() as $edge) { $w = $edge->getV1(); $wt = $edge->getWeight(); $min = min($min, $this->latestTime[$w->getNumber()] - unbox($wt)); } $this->latestTime[$v->getNumber()] = $min; }