Ejemplo n.º 1
0
        //
        // Actually perform pebbling on the integer hypergraph (pebbles forward and backward)
        //
        private void Pebble()
        {
            pebbler = new Pebbler.Pebbler(graph, pebblerGraph);

            pathGenerator = new ProblemAnalyzer.PathGenerator(graph);

            // Acquire the integer values of the intrinsic / figure nodes
            List <int> intrinsicSet = CollectGraphIndices(figure);

            // Acquire the integer values of the givens (from the original
            List <int> givenSet = CollectGraphIndices(givens);

            // Perform pebbling based on the <figure, given> pair.
            pebbler.Pebble(intrinsicSet, givenSet);

            if (Utilities.PEBBLING_DEBUG)
            {
                Debug.WriteLine("Forward Vertices after pebbling:");
                for (int i = 0; i < pebblerGraph.vertices.Length; i++)
                {
                    StringBuilder strLocal = new StringBuilder();
                    strLocal.Append(pebblerGraph.vertices[i].id + ": pebbled(" + pebblerGraph.vertices[i].pebbled + ")");
                    Debug.WriteLine(strLocal.ToString());
                }

                pebbler.DebugDumpClauses();
            }
        }
Ejemplo n.º 2
0
        //
        // Actually perform pebbling on the integer hypergraph (pebbles forward and backward)
        //
        private void Pebble()
        {
            pebbler = new Pebbler.Pebbler(graph, pebblerGraph);

            pathGenerator = new ProblemAnalyzer.PathGenerator(graph);

            // Acquire the integer values of the intrinsic / figure nodes
            List<int> intrinsicSet = CollectGraphIndices(figure);

            // Acquire the integer values of the givens (from the original
            List<int> givenSet = CollectGraphIndices(givens);

            // Perform pebbling based on the <figure, given> pair.
            pebbler.Pebble(intrinsicSet, givenSet);

            if (Utilities.PEBBLING_DEBUG)
            {
                Debug.WriteLine("Forward Vertices after pebbling:");
                for (int i = 0; i < pebblerGraph.vertices.Length; i++)
                {
                    StringBuilder strLocal = new StringBuilder();
                    strLocal.Append(pebblerGraph.vertices[i].id + ": pebbled(" + pebblerGraph.vertices[i].pebbled + ")");
                    Debug.WriteLine(strLocal.ToString());
                }

                pebbler.DebugDumpClauses();
            }
        }