Difference between revisions of "Visual network topoloy"

From Artificial Neural Network for PHP
Line 10: Line 10:
 
catch(Exception $e)
 
catch(Exception $e)
 
{
 
{
print 'Network not found';
+
die('Network not found');
 
exit;
 
 
}
 
}
   

Revision as of 15:45, 28 December 2008

PNG image of network topology

require_once 'ANN/ANN_Loader.php';

try
{
  $objNetwork = ANN_Network::loadFromFile('xor.dat');
}
catch(Exception $e)
{
  die('Network not found');
}

$objNetworkImage = new ANN_NetworkGraph($objNetwork);

$objNetworkImage->saveToFile('network.png');

Output

Image of network toplogy