public Problem(Problem <A> thatProblem) { givens = new List <int>(thatProblem.givens); goal = thatProblem.goal; path = new List <int>(thatProblem.path); edges = new List <PebblerHyperEdge <A> >(thatProblem.edges); suppressedGivens = new List <int>(thatProblem.suppressedGivens); graph = new DiGraph(thatProblem.graph); }
// For backward problem generation public Problem() { givens = new List <int>(); goal = -1; path = new List <int>(); edges = new List <PebblerHyperEdge <A> >(); suppressedGivens = new List <int>(); graph = new DiGraph(); }
public Problem(PebblerHyperEdge <A> edge) { givens = new List <int>(edge.sourceNodes); goal = edge.targetNode; path = new List <int>(); edges = new List <PebblerHyperEdge <A> >(); edges.Add(edge); suppressedGivens = new List <int>(); graph = new DiGraph(); graph.AddHyperEdge(givens, goal); }
// // Make a shallow copy of this graph (all vertices and edges) // public DiGraph(DiGraph thatGraph) { edgeMap = new Dictionary<int, List<int>>(); transposeEdgeMap = new Dictionary<int, List<int>>(); numEdges = thatGraph.numEdges; vertices = new List<int>(thatGraph.vertices); // Copy the integer indices foreach (KeyValuePair<int, List<int>> pair in thatGraph.edgeMap) { edgeMap.Add(pair.Key, new List<int>(pair.Value)); } // Copy the integer indices foreach (KeyValuePair<int, List<int>> pair in thatGraph.transposeEdgeMap) { transposeEdgeMap.Add(pair.Key, new List<int>(pair.Value)); } sccs = GetStronglyConnectedComponents(); }
// // Make a shallow copy of this graph (all vertices and edges) // public DiGraph(DiGraph thatGraph) { edgeMap = new Dictionary <int, List <int> >(); transposeEdgeMap = new Dictionary <int, List <int> >(); numEdges = thatGraph.numEdges; vertices = new List <int>(thatGraph.vertices); // Copy the integer indices foreach (KeyValuePair <int, List <int> > pair in thatGraph.edgeMap) { edgeMap.Add(pair.Key, new List <int>(pair.Value)); } // Copy the integer indices foreach (KeyValuePair <int, List <int> > pair in thatGraph.transposeEdgeMap) { transposeEdgeMap.Add(pair.Key, new List <int>(pair.Value)); } sccs = GetStronglyConnectedComponents(); }