Visual network topoloy: Difference between revisions
From Artificial Neural Network for PHP
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
<source lang="php"> |
<source lang="php"> |
||
require_once 'ANN/ |
require_once 'ANN/Loader.php'; |
||
use ANN\Network; |
|||
use ANN\NetworkGraph; |
|||
try |
try |
||
{ |
{ |
||
$objNetwork = |
$objNetwork = Network::loadFromFile('xor.dat'); |
||
} |
} |
||
catch(Exception $e) |
catch(Exception $e) |
||
Line 13: | Line 16: | ||
} |
} |
||
$objNetworkImage = new |
$objNetworkImage = new NetworkGraph($objNetwork); |
||
$objNetworkImage->saveToFile('network.png'); |
$objNetworkImage->saveToFile('network.png'); |
Latest revision as of 12:12, 1 June 2011
PNG image of network topology
require_once 'ANN/Loader.php';
use ANN\Network;
use ANN\NetworkGraph;
try
{
$objNetwork = Network::loadFromFile('xor.dat');
}
catch(Exception $e)
{
die('Network not found');
}
$objNetworkImage = new NetworkGraph($objNetwork);
$objNetworkImage->saveToFile('network.png');