Class WeightedMarkovEdgeChainBase<TVertex, TEdge>
Base class for Markov chain with weight.
Inheritance
Inherited Members
Namespace: QuikGraph.Algorithms.RandomWalks
Assembly: QuikGraph.dll
Syntax
public abstract class WeightedMarkovEdgeChainBase<TVertex, TEdge> : MarkovEdgeChainBase<TVertex, TEdge>, IMarkovEdgeChain<TVertex, TEdge>, IEdgeChain<TVertex, TEdge> where TEdge : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Constructors
| Improve this Doc View SourceWeightedMarkovEdgeChainBase(IDictionary<TEdge, Double>)
Initializes a new instance of the WeightedMarkovEdgeChainBase<TVertex, TEdge> class.
Declaration
protected WeightedMarkovEdgeChainBase(IDictionary<TEdge, double> edgeWeights)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<TEdge, System.Double> | edgeWeights | Map that contains edge weights. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Properties
| Improve this Doc View SourceWeights
Map of edge weights.
Declaration
public IDictionary<TEdge, double> Weights { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<TEdge, System.Double> |
Methods
| Improve this Doc View SourceGetOutWeight(IImplicitGraph<TVertex, TEdge>, TVertex)
Gets the weight of the given vertex
out edges.
Declaration
protected double GetOutWeight(IImplicitGraph<TVertex, TEdge> graph, TVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
IImplicitGraph<TVertex, TEdge> | graph | Graph to consider. |
TVertex | vertex | Vertex to get out weight. |
Returns
Type | Description |
---|---|
System.Double | Out weight. |
GetWeights(IEnumerable<TEdge>)
Gets the weight corresponding to all given edges
.
Declaration
protected double GetWeights(IEnumerable<TEdge> edges)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TEdge> | edges | Edges to get total weight. |
Returns
Type | Description |
---|---|
System.Double | Edges weight. |
TryGetSuccessor(IImplicitGraph<TVertex, TEdge>, TVertex, Double, out TEdge)
Tries to get the successor of the given vertex
in the given graph
.
Declaration
protected bool TryGetSuccessor(IImplicitGraph<TVertex, TEdge> graph, TVertex vertex, double position, out TEdge successor)
Parameters
Type | Name | Description |
---|---|---|
IImplicitGraph<TVertex, TEdge> | graph | The graph to search in. |
TVertex | vertex | The vertex. |
System.Double | position | The position. |
TEdge | successor | Found successor, otherwise null. |
Returns
Type | Description |
---|---|
System.Boolean | True if a successor was found, false otherwise. |
TryGetSuccessor(IEnumerable<TEdge>, Double, out TEdge)
Tries to get the successor at the given position
in the given set of edges
.
Declaration
protected bool TryGetSuccessor(IEnumerable<TEdge> edges, double position, out TEdge successor)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TEdge> | edges | Edge set in which searching. |
System.Double | position | The position. |
TEdge | successor | Found successor, otherwise null. |
Returns
Type | Description |
---|---|
System.Boolean | True if a successor was found, false otherwise. |