Skip to content

Commit

Permalink
Merge branch 'rel-0.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Grant committed Sep 9, 2014
2 parents 9f9a9b8 + 19f47a7 commit 5d3ec56
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ station at a least dish-washing dish washer competition.
Solutions are found through an iterative process. In each iteration,
several ants are allowed to find a solution that "visits" every node of
the world. The amount of pheromone on each edge is updated according to
its the length of solutions in which it was used. The ant that traveled the
the length of the solutions in which it was used. The ant that traveled the
least distance is considered to be the local best solution. If the local
solution has a shorter distance than the best from any previous
iteration, it then becomes the global best solution. The elite ant(s)
Expand All @@ -45,9 +45,9 @@ Installation via ``pip``
$ pip3 install ACO-Pants
------
Useage
------
-----
Usage
-----

Using **Pants** is simple. The example here uses Euclidean distance
between 2D nodes with ``(x, y)`` coordinates, but there are no real
Expand Down Expand Up @@ -75,7 +75,7 @@ requirements for node data of any sort.
3) Define your length function. This function must accept two nodes and
return the amonut of "work" between them. In this case, Euclidean
return the amount of "work" between them. In this case, Euclidean
distance works well.

.. code-block:: python
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
# built documents.
#
# The short X.Y version.
version = '0.5.1'
version = '0.5.2'
# The full version, including alpha/beta/rc tags.
release = '0.5.1'
release = '0.5.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion pants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Solutions are found through an iterative process. In each iteration,
several ants are allowed to find a solution that "visits" every node of
the world. The amount of pheromone on each edge is updated according to
its the length of solutions in which it was used. The ant that traveled the
the length of the solutions in which it was used. The ant that traveled the
least distance is considered to be the local best solution. If the local
solution has a shorter distance than the best from any previous
iteration, it then becomes the global best solution. The elite ant(s)
Expand Down
2 changes: 1 addition & 1 deletion pants/ant.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Ant:
Once an :class:`Ant` has found a solution (or at any time), the solution
may be obtained and inspected by accessing its ``tour`` property, which
returns the nodes visited in order, or it's ``path`` property, which
returns the nodes visited in order, or its ``path`` property, which
returns the edges visited in order. Also, the total distance of the
solution can be accessed through its ``distance`` property. :class:`Ant`\s
are even sortable by their distance:
Expand Down
12 changes: 6 additions & 6 deletions pants/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, nodes, lfunc, **kwargs):

@property
def nodes(self):
"""Nodes IDs."""
"""Node IDs."""
return list(range(len(self._nodes)))

def create_edges(self):
Expand Down Expand Up @@ -133,15 +133,15 @@ class Edge:
information, whereas *pheromone* level represents the dynamic, *a
posteriori* information.
:param Node a: the node at the start of the :class:`Edge`
:param Node b: the node at the end of the :class:`Edge`
:param node start: the node at the start of the :class:`Edge`
:param node end: the node at the end of the :class:`Edge`
:param float length: the length of the :class:`Edge` (default=1)
:param float pheromone: the amount of pheromone on the :class:`Edge`
(default=0.1)
"""
def __init__(self, a, b, length=None, pheromone=None):
self.start = a
self.end = b
def __init__(self, start, end, length=None, pheromone=None):
self.start = start
self.end = end
self.length = 1 if length is None else length
self.pheromone = 0.1 if pheromone is None else pheromone

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="ACO-Pants",
version="0.5.1",
version="0.5.2",
author="Robert Grant",
author_email="rhgrant10@gmail.com",
packages=["pants", "pants.test"],
Expand Down

0 comments on commit 5d3ec56

Please sign in to comment.