Last change
on this file since 8300 was
8300,
checked in by spimming, 12 years ago
|
#1894:
- graph data structures added
- method to get the ways for a specific node
|
File size:
564 bytes
|
Line | |
---|
1 |
|
---|
2 | namespace HeuristicLab.Problems.RoutePlanning.Graph {
|
---|
3 | public class Edge<Vertex> : IEdge<Vertex> {
|
---|
4 | private readonly Vertex source;
|
---|
5 | public Vertex Source {
|
---|
6 | get { return this.source; }
|
---|
7 | }
|
---|
8 |
|
---|
9 | private readonly Vertex target;
|
---|
10 | public Vertex Target {
|
---|
11 | get { return this.target; }
|
---|
12 | }
|
---|
13 |
|
---|
14 | public Edge(Vertex source, Vertex target) {
|
---|
15 | this.source = source;
|
---|
16 | this.target = target;
|
---|
17 | }
|
---|
18 |
|
---|
19 | public override string ToString() {
|
---|
20 | return string.Format("{0}->{1}", this.Source, this.Target);
|
---|
21 | }
|
---|
22 | }
|
---|
23 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.