com.c5corp.c5Algorithms
Class RandomHiker
java.lang.Object
com.c5corp.c5Algorithms.AbstractHiker
com.c5corp.c5Algorithms.RandomHiker
public class RandomHiker
- extends AbstractHiker
The RandomHiker class extends AbstractHiker, implementing an artificial hiking algorithm
based on random choices from among three degrees of freedom (cardinal direction) in the general
direction of the target or target point. It is rarely useful in one pass, as its random behavior
often leads to the hiker violating its no cycle rule, at which point it returns a path marked
as a failure.
The main use of objects this class is as the fodder for the SlopeReductionHiker class.
- Since:
- 2.0
- See Also:
SlopeReductionHiker
Constructor Summary |
RandomHiker(int zone,
java.lang.String zoneChar,
UtmCoordinatePair start,
UtmCoordinatePair target,
java.sql.Connection connection)
Creates an RandomHiker from the UTM zone, the starting and target point, some padding
(in meters) around the rectangular area specified by the two points, and a Connection object. |
RandomHiker(int zone,
java.lang.String zoneChar,
UtmCoordinatePair start,
UtmCoordinatePair target,
int padding,
java.sql.Connection connection)
Creates an RandomHiker from the UTM zone, the starting and target point, some padding
(in meters) around the rectangular area specified by the two points, and a Connection object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomHiker
public RandomHiker(int zone,
java.lang.String zoneChar,
UtmCoordinatePair start,
UtmCoordinatePair target,
int padding,
java.sql.Connection connection)
- Creates an RandomHiker from the UTM zone, the starting and target point, some padding
(in meters) around the rectangular area specified by the two points, and a Connection object.
This constructor is ideal if you have a connection object to recycle.
Note that all Virtual Hikers need the grid zone designation character (GZD). If
you do not know it, try using one in your hemisphere. Many GPS devices
will correct.
- Parameters:
zone
- the UTM zonezoneChar
- the UTM grid zone designation character (GZD)start
- The starting coordinates of the virtual hikertarget
- The target coordinates of the virtual hikerpadding
- the number of meters to add aroundconnection
- a connection object (see DbHelper)- See Also:
exceeding this slope.
RandomHiker
public RandomHiker(int zone,
java.lang.String zoneChar,
UtmCoordinatePair start,
UtmCoordinatePair target,
java.sql.Connection connection)
- Creates an RandomHiker from the UTM zone, the starting and target point, some padding
(in meters) around the rectangular area specified by the two points, and a Connection object.
This constructor is ideal if you have a connection object to recycle.
Note that all Virtual Hikers need the grid zone designation character (GZD). If
you do not know it, try using one in your hemisphere. Many GPS devices
will correct.
- Parameters:
zone
- the UTM zonezoneChar
- the UTM grid zone designation character (GZD)start
- The starting coordinates of the virtual hikertarget
- The target coordinates of the virtual hikerconnection
- a connection object (see DbHelper)- See Also:
exceeding this slope.
getTrack
public VirtualHikerTrackLog getTrack()
- Returns a VirtualHikerTrackLog object containing the results of a run of the Random Hiker.
This method will very likely return a different track each time it is called.
- Specified by:
getTrack
in class AbstractHiker
- Returns:
- a VirtualHikerTrackLog object containing the results of the artificial hike
getUtmCoordinatePairElevArray
public UtmCoordinatePairElev[][] getUtmCoordinatePairElevArray()
- The RandomHiker class produces a UtmCoordinatePairElev[][] as part
of its processing of the track. This object can be useful for many
things, such as imaging.
- Returns:
- a UtmCoordinatePairElev[][] array representing the area the vhiker searched