src/Alg/Math/Analysis/Interpolation/Lagrange.php
public function buildExpressions()
	{
		$this->expressions	= array();
		$values	= array_keys( $this->data );
		for( $i=0; $i<count( $values ); $i++ )
		{
			$this->expressions[$i]	= "";
			for( $k=0; $k<count( $values ) ;$k++ )
			{
				if( $k == $i )
					continue;
				$expression	= "(x-".$values[$k].")/(".$values[$i]."-".$values[$k].")";
				if( strlen( $this->expressions[$i] ) )
					$this->expressions[$i]	.= "*".$expression;
				else
					$this->expressions[$i]	= $expression;
			}
		}
	}
public function buildExpressions()
	{
		$this->expressions	= array();
		$values	= array_keys( $this->data );
		for( $i=0; $i<count( $values ); $i++ )
		{
			$this->expressions[$i]	= "";
			for( $k=0; $k<count( $values ) ;$k++ )
			{
				if( $k == $i )
					continue;
				$expression	= "(x-".$values[$k].")/(".$values[$i]."-".$values[$k].")";
				if( strlen( $this->expressions[$i] ) )
					$this->expressions[$i]	.= "*".$expression;
				else
					$this->expressions[$i]	= $expression;
			}
		}
	}
public function buildExpressions ( ) { $ this -> expressions = array ( ) ; $ values = array_keys ( $ this -> data ) ; for ( $ i = 0 ; $ i < count ( $ values ) ; $ i ++ ) { $ this -> expressions [ $ i ] = "" ; for ( $ k = 0 ; $ k < count ( $ values ) ; $ k ++ ) { if ( $ k == $ i ) continue ; $ expression = "(x-" . $ values [ $ k ] . ")/(" . $ values [ $ i ] . "-" . $ values [ $ k ] . ")" ; if ( strlen ( $ this -> expressions [ $ i ] ) ) $ this -> expressions [ $ i ] .= "*" . $ expression ; else $ this -> expressions [ $ i ] = $ expression ; } } }
Build Expressions for Interpolation.
@access		public
@return		void
Build Expressions for Interpolation .