예제 #1
0
        public static SolutionSpec BuildSolutionByGraph(
            Graph <PointProjectionSolver.ProjectedEdgeInfo, PointProjectionSolver.ProjectedNodeInfo> graph)
        {
            var cycleFinder = new CycleFinder <PointProjectionSolver.ProjectedEdgeInfo, PointProjectionSolver.ProjectedNodeInfo>(
                graph,
                n => n.Data.Projection);

            return(BuildSolutionByCycles(cycleFinder.GetCycles()));
        }
예제 #2
0
        public static SolutionSpec BuildSolutionByRibbonGraph(Graph <PointProjectionSolver.ProjectedEdgeInfo, PointProjectionSolver.ProjectedNodeInfo> graph)
        {
            var cycleFinder = new CycleFinder <PointProjectionSolver.ProjectedEdgeInfo, PointProjectionSolver.ProjectedNodeInfo>(
                graph,
                n => n.Data.Projection);
            var cycles = cycleFinder.GetCycles();

            var reflectedCycles = CycleReflector.GetUnribbonedCycles(cycles);

            return(SolutionSpecBuilder.BuildSolutionByCycles(reflectedCycles));
        }