$gobjs[] = new Line("red", 60, 40, 10, 300); $gobjs[] = new Line("green", 5, 390, 390, 10); foreach ($gobjs as $gobj) { $gobj->render($ge); } $img = "/tmp/test.png"; //$ge->saveAsPng( $img ); //$ge->showPng(); $curv = new Curve(array(100, 100, 100)); $curv->SetYarr($sfr->rfrqs); $curv->render($ge); $curv->SetYarr($sfr6->rfrqs); $curv->render($ge); //$curv->SetYarr( $sfr3->rfrqs ); //$curv->render( $ge ); //$curv->SetYarr( $sfr4->rfrqs ); $curv->render($ge); //$curv->SetYarr( $sfr5->rfrqs ); $curv->render($ge); $stam = new StatisticMatch(); $stam->match2($sfr->words, $sfr6->words); $mat = new MatchLines(array(0, 0, 255)); $mat->SetPairs($stam->pairs); $mat->render($ge); $ge->showPng(); //echo "<img src='$img'/>"; echo $img; ?>
//$_REQUEST["sel_0"]; $file1 = setfile(1); //$_REQUEST["sel_1"]; //$_SESSION["sel_0"] = $file0; //$_SESSION["sel_1"] = $file1; print "{$file0} <=> {$file1} <a href='book_statistic_compareGraph.php'>View Graph</a><br>\r\n"; syslog(0, "file0={$file0},file1={$file1}"); $sc = new StatisticCompare(); $sc->compare($file0, $file1); $sc->show("statistic_compareGraph.php"); exit(0); $sfr0 = new StatisticFileReader(); $sfr0->load("/tmp/{$file0}"); $sfr1 = new StatisticFileReader(); $sfr1->load("/tmp/{$file1}"); $stam = new StatisticMatch(); $stam->match2($sfr0->words, $sfr1->words); $iMax = count($sfr0->statistic); if ($iMax > count($sfr1->statistic)) { $iMax = count($sfr1->statistic); } for ($ii = 0; $ii < $iMax; $ii++) { if ($stam->IsMatch($ii)) { print "*****"; } else { print "- - - -"; } print $sfr0->statistic[$ii] . "===" . $sfr1->statistic[$ii] . "<br>"; } exit(0); /////////////////////////////////////