maspack.util
Class FastDijkstraMarcher
java.lang.Object
maspack.util.FastMarcherBase
maspack.util.FastDijkstraMarcher
public class FastDijkstraMarcher
- extends FastMarcherBase
Performs an algorithm similar to "Fast Marching", except uses graph
distances like Dijkstra's algorithm. This is faster but less accurate
than the real F-M. This implementation does support varying propagation
speeds, defined at points. The speed along an edge is assumed to be
the average between two points.
- Author:
- Antonio
Constructor Summary |
FastDijkstraMarcher(int dataSize,
FastMarcherUtility utility)
Creates a FastRadialMarcher object for a given data size, and uses the
supplied utility object to connect to data for finding neighbours and
computing distances |
Method Summary |
void |
setSpeeds(double[] speed)
Assigns a vector of 'speeds' associated with each node. |
Methods inherited from class maspack.util.FastMarcherBase |
clear, createDistanceHeap, getDistance, getDistanceHeap, getFarthest, getVoronoi, initializeArrays, march, march, march, march, reset, setDistance, setDistanceHeap, setVoronoi, startmarch, startmarch, step |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FastDijkstraMarcher
public FastDijkstraMarcher(int dataSize,
FastMarcherUtility utility)
- Creates a FastRadialMarcher object for a given data size, and uses the
supplied utility object to connect to data for finding neighbours and
computing distances
setSpeeds
public void setSpeeds(double[] speed)
- Assigns a vector of 'speeds' associated with each node. The speed can be
thought of as a scaling factor. The "distance" between adjacent nodes
is given by:
distance[node2] = distance[node1] +
dist(node1,node2)*(speed[node1]+speed[node2])/2
If speed=null
, the speed array is cleared, and all speeds are
assumed to be 1.