Permalink
Browse files

Introduced a new utility for computing the first shortest path and al…

…l shortest paths from a start to an end atom. This implementation replaces an existing static method in PathTools which has now been deprecated. Another helper class was added that simplifies the computation of all-vs-all shortest paths.
  • Loading branch information...
1 parent 22d2490 commit c84d22ba32fe44fabecc8a20a55568d604aa29d5 @johnmay committed Dec 17, 2012
@@ -450,8 +450,15 @@ public static int getVertexCountAtDistance(IAtomContainer atomContainer, int dis
* @param end The ending atom
* @return A <code>List</code> containing the atoms in the shortest path between <code>start</code> and
* <code>end</code> inclusive
+ * @see ShortestPaths
+ * @see ShortestPaths#atomsTo(IAtom)
+ * @see AllShortestPaths
+ * @deprecated This implementation recalculates all shortest paths from the start atom
+ * for each method call and does not indicate if there are equally short paths
+ * from the start to the end. Replaced by {@link ShortestPaths#atomsTo(IAtom)}
*/
@TestMethod("testGetShortestPath_IAtomContainer_IAtom_IAtom")
+ @Deprecated
public static List<IAtom> getShortestPath(IAtomContainer atomContainer, IAtom start, IAtom end) {
int natom = atomContainer.getAtomCount();
int endNumber = atomContainer.getAtomNumber(end);
Oops, something went wrong. Retry.

3 comments on commit c84d22b

@egonw
egonw commented on c84d22b Dec 19, 2012

Overall it looks really good, and of high quality... I can get used to this :)

@egonw
egonw commented on c84d22b Dec 20, 2012

No PMD warnings found. Compiles fine too. So, please fix those spelling errors, add the @cdk.githash lines, and I'm good.

@johnmay
Owner

Okay will do

Please sign in to comment.