Skip to content

Commit

Permalink
Merge pull request RunestoneInteractive#69 from RustyDotson/master
Browse files Browse the repository at this point in the history
replaced the word "cost" with the word "weight."

closes RunestoneInteractive#5
  • Loading branch information
bnmnetp authored Sep 6, 2019
2 parents 0b5e4d8 + 4352b25 commit dc9c9e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _sources/Graphs/Implementation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ themselves.
def __contains__(self,n):
return n in self.vertList
def addEdge(self,f,t,cost=0):
def addEdge(self,f,t,weight=0):
if f not in self.vertList:
nv = self.addVertex(f)
if t not in self.vertList:
nv = self.addVertex(t)
self.vertList[f].addNeighbor(self.vertList[t], cost)
self.vertList[f].addNeighbor(self.vertList[t], weight)
def getVertices(self):
return self.vertList.keys()
Expand Down

0 comments on commit dc9c9e1

Please sign in to comment.