src/Alg/Math/Analysis/Interpolation/Newton.php
public function buildPolynomial()
	{
		$t		= array();
		$a		= array();
		$keys	= array_keys( $this->data );
		$values	= array_values( $this->data );
		for( $i=0; $i<count( $keys ); $i++ )
		{
			$t[$i]	= $values[$i];
			for( $j=$i-1; $j>=0; $j-- )
				$t[$j]	= ( $t[$j+1] - $t[$j] ) / ( $keys[$i] - $keys[$j] );
			$a[$i]	= $t[0];
		}
		$this->polynomial	= $a;
	}
public function buildPolynomial()
	{
		$t		= array();
		$a		= array();
		$keys	= array_keys( $this->data );
		$values	= array_values( $this->data );
		for( $i=0; $i<count( $keys ); $i++ )
		{
			$t[$i]	= $values[$i];
			for( $j=$i-1; $j>=0; $j-- )
				$t[$j]	= ( $t[$j+1] - $t[$j] ) / ( $keys[$i] - $keys[$j] );
			$a[$i]	= $t[0];
		}
		$this->polynomial	= $a;
	}
public function buildPolynomial ( ) { $ t = array ( ) ; $ a = array ( ) ; $ keys = array_keys ( $ this -> data ) ; $ values = array_values ( $ this -> data ) ; for ( $ i = 0 ; $ i < count ( $ keys ) ; $ i ++ ) { $ t [ $ i ] = $ values [ $ i ] ; for ( $ j = $ i - 1 ; $ j >= 0 ; $ j -- ) $ t [ $ j ] = ( $ t [ $ j + 1 ] - $ t [ $ j ] ) / ( $ keys [ $ i ] - $ keys [ $ j ] ) ; $ a [ $ i ] = $ t [ 0 ] ; } $ this -> polynomial = $ a ; }
Build Polynomial for Interpolation.
@access		public
@return		void
Build Polynomial for Interpolation .