src/Alg/Search/Interpolation.php
protected function calculateIndex( $list, $search, $lowbound, $highbound )
	{
		$spanIndex	= $list[$highbound] - $list[$lowbound];
		$spanValues	= $highbound - $lowbound;
		$spanDiff	= $search - $list[$lowbound];
		$index		= $lowbound + round( $spanValues * ( $spanDiff / $spanIndex ) );
		return $index;
	}
protected function calculateIndex( $list, $search, $lowbound, $highbound )
	{
		$spanIndex	= $list[$highbound] - $list[$lowbound];
		$spanValues	= $highbound - $lowbound;
		$spanDiff	= $search - $list[$lowbound];
		$index		= $lowbound + round( $spanValues * ( $spanDiff / $spanIndex ) );
		return $index;
	}
protected function calculateIndex ( $ list , $ search , $ lowbound , $ highbound ) { $ spanIndex = $ list [ $ highbound ] - $ list [ $ lowbound ] ; $ spanValues = $ highbound - $ lowbound ; $ spanDiff = $ search - $ list [ $ lowbound ] ; $ index = $ lowbound + round ( $ spanValues * ( $ spanDiff / $ spanIndex ) ) ; return $ index ; }
Calculates next bound index.
@access		protected
@param		array		$ist			List to search in
@param		mixed		$search			Element to search
@param		int			$lowbound		Last lower bound
@param		int			$highbound		Last higher bound
@return 	int
Calculates next bound index .