public static function getInstance($graphUID = NULL, $nodes = array(), $edges = array(), $directed = FALSE)
    {
        if (is_object(static::$instance[$graphUID]) && is_a(static::$instance[$graphUID], 'Graph'))
            return static::$instance[$graphUID];
        $graph = new self($nodes, $edges, $directed, $graphUID);
        if (!empty($graphUID)) {
            static::$instance[$graphUID] = &$graph;
        }
        return $graph;
    }