Example #1
0
function draw($points)
{
    $xy = getXY($points);
    $map = getMap($xy['x'], $xy['y']);
    $set = getSet($points, $xy['x']);
    create($map, $set, $xy['x']);
}
Example #2
0
                    $max = $v;
                }
                if ($key > $v) {
                    $subGraphs[] = array($v, $key);
                    $wasFor = true;
                }
            }
            if (!$wasFor) {
                $subGraphs[] = array($key, $max);
                $wasFor = false;
            }
        }
    }
    return $subGraphs;
}
$setOfDivition = getSet($subGraphs);
function getSet($graph)
{
    $set = array();
    foreach ($graph as $key => $value) {
        foreach ($value as $k => $v) {
            $set[] = $v;
        }
    }
    return array_unique($set);
}
//echo "------------------setOfDivition----------------";
//var_dump($setOfDivition);
global $allSubPaths;
$allSubPaths = array();
$divideGraph = getDivideGraph($graph, $setOfDivition);