Commit 1b048f05 authored by Andrey Filippov's avatar Andrey Filippov

Debugging multi-satelite search

parent d49ee8a4
......@@ -7,7 +7,7 @@ class PolynomialApproximation
public $debugLevel = 1;
public $debugFile = null;
public function polynomialApproximation1d($data, $N){
public function polynomialApproximation1d($data, $N, $noreduce=true){
//$my_array = array_fill(0, $size_of_the_array, $some_data);
if ($this->debugFile === null){
$this->debugLevel = 0;
......@@ -70,8 +70,14 @@ class PolynomialApproximation
return $result;
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), ", reducing polynomial order\n";
if ($N1 < 0 ) {
//// fprintf($dbg_file, print_r(debug_backtrace(),1));
fprintf($this->debugFile,
"polynomialApproximation1d() Caught exception: ".$e->getMessage(), ", reducing polynomial order\n");
fprintf($this->debugFile, print_r(debug_backtrace(),1)."\n");
fprintf($this->debugFile, "data=".print_r(debug_backtrace(),1)."\nMatrix M:\n");
$M->print($this->debugFile);
// echo 'Caught exception: ', $e->getMessage(), ", reducing polynomial order\n";
if (($N1 < 0) || $noreduce) {
return null;
}
$N1--;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment