!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_tdfonline/php/3ros/phpExcel/PHPExcel/Shared/JAMA/examples/   drwxr-xr-x
Free 13.17 GB of 61.93 GB (21.27%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     LagrangeInterpolation.php (1.27 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

require_once "../Matrix.php";

/**
 * Given n points (x0,y0)...(xn-1,yn-1), the following methid computes
 * the polynomial factors of the n-1't degree polynomial passing through
 * the n points.
 *
 * Example: Passing in three points (2,3) (1,4) and (3,7) will produce
 * the results [2.5, -8.5, 10] which means that the points are on the
 * curve y = 2.5x² - 8.5x + 10.
 *
 * @see http://geosoft.no/software/lagrange/LagrangeInterpolation.java.html
 * @author Jacob Dreyer
 * @author Paul Meagher (port to PHP and minor changes)
 *
 * @param x[] float
 * @param y[] float
 */
class LagrangeInterpolation {

    public function 
findPolynomialFactors($x$y) {
        
$n count($x);

        
$data = array();  // double[n][n];
        
$rhs  = array();  // double[n];

        
for ($i 0$i $n; ++$i) {
            
$v 1;
            for (
$j 0$j $n; ++$j) {
                
$data[$i][$n-$j-1] = $v;
                
$v *= $x[$i];
            }
            
$rhs[$i] = $y[$i];
        }

        
// Solve m * s = b
        
$m = new Matrix($data);
        
$b = new Matrix($rhs$n);

        
$s $m->solve($b);

        return 
$s->getRowPackedCopy();
    }    
//    function findPolynomialFactors()

}    //    class LagrangeInterpolation


$x = array(2.01.03.0);
$y = array(3.04.07.0);

$li = new LagrangeInterpolation;
$f $li->findPolynomialFactors($x$y);


for (
$i 0$i 3; ++$i) {
    echo 
$f[$i]."<br />";
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.5411 ]--