roomba.roombanetwork.services.camloc.travelgraph
Class PathEdge

java.lang.Object
  extended by roomba.roombanetwork.services.camloc.travelgraph.PathEdge

public class PathEdge
extends java.lang.Object


Constructor Summary
PathEdge(ImageVertex beginVertex, ImageVertex endVertex, double heading, double distance)
           
 
Method Summary
 ImageVertex getBeginVertex()
           
 double getDistance()
           
 ImageVertex getEndVertex()
           
 double getHeading()
           
 PathEdge getUnifiedEdge()
           
 boolean unification(PathEdge edge2)
          The process of unification will take a second edge and merge it into this edge if possible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathEdge

public PathEdge(ImageVertex beginVertex,
                ImageVertex endVertex,
                double heading,
                double distance)
Method Detail

getBeginVertex

public ImageVertex getBeginVertex()

getEndVertex

public ImageVertex getEndVertex()

getHeading

public double getHeading()

getDistance

public double getDistance()

getUnifiedEdge

public PathEdge getUnifiedEdge()

unification

public boolean unification(PathEdge edge2)
The process of unification will take a second edge and merge it into this edge if possible. Only edges that have the same 2 vertices will be merged. The oldest heading will be used and the distance will be a weighted average of the distances, with the weights being the number of readings that the edge represents. This method will return true if unification was performed and false otherwise.