/// <param name="edges">list of edges</param>
        /// <param name="graphEdgesValidationDesired">should be NO (for performance reason) if validation has already been done</param>
        /// <returns>an instance of a PathFinderGenerics implementation</returns>
        public F CreatePathFinder(
            IList <E> edges,
            GraphEdgesValidationDesired graphEdgesValidationDesired
            )
        {
            GraphGenerics <E, V, W> graph = GraphGenericsImpl <E, V, W> .CreateGraphGenerics <E, V, W>(edges, graphEdgesValidationDesired);

            return(CreatePathFinder(graph));    // the overloaded method must be implemented by subclasses
        }
예제 #2
0
        public static GraphGenerics <E, V, W> CreateGraphGenerics <E, V, W>(
            IList <E> edges,
            GraphEdgesValidationDesired graphEdgesValidationDesired
            )
            where E : EdgeGenerics <V, W>
            where V : Vertex
            where W : Weight
        {
            var g = new GraphGenericsImpl <E, V, W>(
                edges,
                graphEdgesValidationDesired
                );

            return(g);
        }
 private GraphGenerics <EdgeGenerics <Vertex, Weight>, Vertex, Weight> createGraphGenerics(IList <EdgeGenerics <Vertex, Weight> > edges)
 {
     return(GraphGenericsImpl <EdgeGenerics <Vertex, Weight>, Vertex, Weight> .CreateGraphGenerics <EdgeGenerics <Vertex, Weight>, Vertex, Weight>(edges));
 }