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

Debugging multi-satelite search

parent d49ee8a4
...@@ -7,7 +7,7 @@ class PolynomialApproximation ...@@ -7,7 +7,7 @@ class PolynomialApproximation
public $debugLevel = 1; public $debugLevel = 1;
public $debugFile = null; 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); //$my_array = array_fill(0, $size_of_the_array, $some_data);
if ($this->debugFile === null){ if ($this->debugFile === null){
$this->debugLevel = 0; $this->debugLevel = 0;
...@@ -70,8 +70,14 @@ class PolynomialApproximation ...@@ -70,8 +70,14 @@ class PolynomialApproximation
return $result; return $result;
} catch (Exception $e) { } catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), ", reducing polynomial order\n"; //// fprintf($dbg_file, print_r(debug_backtrace(),1));
if ($N1 < 0 ) { 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; return null;
} }
$N1--; $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