Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RandomWalkAlgorithm{TVertex,TEdge}"/> class.
 /// </summary>
 /// <param name="visitedGraph">Graph to visit.</param>
 /// <param name="edgeChain">Edge chain strategy to use.</param>
 /// <exception cref="T:System.ArgumentNullException"><paramref name="visitedGraph"/> is <see langword="null"/>.</exception>
 /// <exception cref="T:System.ArgumentNullException"><paramref name="edgeChain"/> is <see langword="null"/>.</exception>
 public RandomWalkAlgorithm(
     [NotNull] IImplicitGraph <TVertex, TEdge> visitedGraph,
     [NotNull] IEdgeChain <TVertex, TEdge> edgeChain)
     : base(null, visitedGraph)
 {
     _edgeChain = edgeChain ?? throw new ArgumentNullException(nameof(edgeChain));
 }
Пример #2
0
        public RandomWalkAlgorithm(
            IImplicitGraph <TVertex, TEdge> visitedGraph,
            IEdgeChain <TVertex, TEdge> edgeChain
            )
        {
            Contract.Requires(visitedGraph != null);
            Contract.Requires(edgeChain != null);

            this.visitedGraph = visitedGraph;
            this.edgeChain    = edgeChain;
        }
Пример #3
0
 public RandomWalkAlgorithm(
     IImplicitGraph <TVertex, TEdge> visitedGraph,
     IEdgeChain <TVertex, TEdge> edgeChain
     )
 {
     if (visitedGraph == null)
     {
         throw new ArgumentNullException("visitedGraph");
     }
     if (edgeChain == null)
     {
         throw new ArgumentNullException("edgeChain");
     }
     this.visitedGraph = visitedGraph;
     this.edgeChain    = edgeChain;
 }