Skip to content

Commit 0fd3f16

Browse files
committed
(#2) Remove varsym of Connection struct and set type of value as real
1 parent 16a25c8 commit 0fd3f16

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/network.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export hassameorder
1414

1515

1616
"""
17-
Connection
17+
Connection
1818
1919
# Description
2020
@@ -23,7 +23,7 @@ A structure to hold a directed connection between two nodes in a network.
2323
# Fields
2424
- `from::Int64`: The starting node of the connection.
2525
- `to::Int64`: The ending node of the connection.
26-
- `value::Any`: The value associated with the connection (e.g. distance, time, capacity).
26+
- `value::Real`: The value associated with the connection (e.g. distance, time, capacity).
2727
2828
# Example
2929
@@ -32,12 +32,10 @@ A structure to hold a directed connection between two nodes in a network.
3232
conn = Connection(1, 2, 5)
3333
```
3434
"""
35-
struct Connection
35+
struct Connection
3636
from::Int64
3737
to::Int64
38-
value::Any
39-
varsym::Any
40-
Connection(from, to, value) = new(from, to, value, string("x", from, to))
38+
value::Real
4139
end
4240

4341

0 commit comments

Comments
 (0)