Skip to content

Commit

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

closes #5
  • Loading branch information
bnmnetp authored Sep 6, 2019
2 parents 951d750 + fa62d24 commit 31d20c2
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 31d20c2

Please sign in to comment.