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 | private short category;
|
---|
15 | public short Category {
|
---|
16 | get { return category; }
|
---|
17 | set { category = value; }
|
---|
18 | }
|
---|
19 |
|
---|
20 | public Edge(Vertex source, Vertex target)
|
---|
21 | : this(source, target, 0) {
|
---|
22 |
|
---|
23 | }
|
---|
24 |
|
---|
25 | public Edge(Vertex source, Vertex target, short category) {
|
---|
26 | this.source = source;
|
---|
27 | this.target = target;
|
---|
28 | this.category = category;
|
---|
29 | }
|
---|
30 |
|
---|
31 | public override string ToString() {
|
---|
32 | return string.Format("{0}->{1}", this.Source, this.Target);
|
---|
33 | }
|
---|
34 | }
|
---|
35 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.