���� JFIF    �� �        "" $(4,$&1'-=-157:::#+?D?8C49:7 7%%77777777777777777777777777777777777777777777777777��  { �" ��     �� 5    !1AQa"q�2��BR��#b�������  ��  ��   ? ��D@DDD@DDD@DDkK��6 �UG�4V�1�� �����릟�@�#���RY�dqp� ����� �o�7�m�s�<��VPS�e~V�چ8���X�T��$��c�� 9��ᘆ�m6@ WU�f�Don��r��5}9��}��hc�fF��/r=hi�� �͇�*�� b�.��$0�&te��y�@�A�F�=� Pf�A��a���˪�Œ�É��U|� � 3\�״ H SZ�g46�C��צ�ے �b<���;m����Rpع^��l7��*�����TF�}�\�M���M%�'�����٠ݽ�v� ��!-�����?�N!La��A+[`#���M����'�~oR�?��v^)��=��h����A��X�.���˃����^Ə��ܯsO"B�c>; �e�4��5�k��/CB��.  �J?��;�҈�������������������~�<�VZ�ꭼ2/)Í”jC���ע�V�G�!���!�F������\�� Kj�R�oc�h���:Þ I��1"2�q×°8��Р@ז���_C0�ր��A��lQ��@纼�!7��F�� �]�sZ B�62r�v�z~�K�7�c��5�.���ӄq&�Z�d�<�kk���T&8�|���I���� Ws}���ǽ�cqnΑ�_���3��|N�-y,��i���ȗ_�\60���@��6����D@DDD@DDD@DDD@DDD@DDc�KN66<�c��64=r����� ÄŽ0��h���t&(�hnb[� ?��^��\��â|�,�/h�\��R��5�? �0�!צ܉-����G����٬��Q�zA���1�����V��� �:R���`�$��ik��H����D4�����#dk����� h�}����7���w%�������*o8wG�LycuT�.���ܯ7��I��u^���)��/c�,s�Nq�ۺ�;�ך�YH2���.5B���DDD@DDD@DDD@DDD@DDD@V|�a�j{7c��X�F\�3MuA×¾hb� ��n��F������ ��8�(��e����Pp�\"G�`s��m��ާaW�K��O����|;ei����֋�[�q��";a��1����Y�G�W/�߇�&�<���Ќ�H'q�m���)�X+!���=�m�ۚ丷~6a^X�)���,�>#&6G���Y��{����"" """ """ """ """ ""��at\/�a�8 �yp%�lhl�n����)���i�t��B�������������?��modskinlienminh.com - WSOX ENC | // +-----------------------------------------------------------------------------+ // /** * The Graph.php file contains the definition of the Structures_Graph class * * @package Structures_Graph */ /* dependencies {{{ */ require_once 'PEAR.php'; require_once 'Structures/Graph/Node.php'; /* }}} */ define('STRUCTURES_GRAPH_ERROR_GENERIC', 100); /* class Structures_Graph {{{ */ /** * The Structures_Graph class represents a graph data structure. * * A Graph is a data structure composed by a set of nodes, connected by arcs. * Graphs may either be directed or undirected. In a directed graph, arcs are * directional, and can be traveled only one way. In an undirected graph, arcs * are bidirectional, and can be traveled both ways. * * @author Srgio Carvalho * @copyright (c) 2004 by Srgio Carvalho * @package Structures_Graph */ /* }}} */ class Structures_Graph { /** * List of node objects in this graph * @access private */ var $_nodes = array(); /** * If the graph is directed or not * @access private */ var $_directed = false; /** * Constructor * * @param boolean $directed Set to true if the graph is directed. * Set to false if it is not directed. */ public function __construct($directed = true) { $this->_directed = $directed; } /** * Old constructor (PHP4-style; kept for BC with extending classes) * * @param boolean $directed Set to true if the graph is directed. * Set to false if it is not directed. * * @return void */ public function Structures_Graph($directed = true) { $this->__construct($directed); } /** * Return true if a graph is directed * * @return boolean true if the graph is directed */ public function isDirected() { return (boolean) $this->_directed; } /** * Add a Node to the Graph * * @param Structures_Graph_Node $newNode The node to be added. * * @return void */ public function addNode(&$newNode) { // We only add nodes if (!is_a($newNode, 'Structures_Graph_Node')) { return Pear::raiseError( 'Structures_Graph::addNode received an object that is not' . ' a Structures_Graph_Node', STRUCTURES_GRAPH_ERROR_GENERIC ); } //Graphs are node *sets*, so duplicates are forbidden. // We allow nodes that are exactly equal, but disallow equal references. foreach ($this->_nodes as $key => $node) { /* ZE1 equality operators choke on the recursive cycle introduced by the _graph field in the Node object. So, we'll check references the hard way (change $this->_nodes[$key] and check if the change reflects in $node) */ $savedData = $this->_nodes[$key]; $referenceIsEqualFlag = false; $this->_nodes[$key] = true; if ($node === true) { $this->_nodes[$key] = false; if ($node === false) { $referenceIsEqualFlag = true; } } $this->_nodes[$key] = $savedData; if ($referenceIsEqualFlag) { return Pear::raiseError( 'Structures_Graph::addNode received an object that is' . ' a duplicate for this dataset', STRUCTURES_GRAPH_ERROR_GENERIC ); } } $this->_nodes[] =& $newNode; $newNode->setGraph($this); } /** * Remove a Node from the Graph * * @param Structures_Graph_Node $node The node to be removed from the graph * * @return void * @todo This is unimplemented */ public function removeNode(&$node) { } /** * Return the node set, in no particular order. * For ordered node sets, use a Graph Manipulator insted. * * @return array The set of nodes in this graph * @see Structures_Graph_Manipulator_TopologicalSorter */ public function &getNodes() { return $this->_nodes; } } ?>