Class HighwayMatrixWave
- java.lang.Object
-
- com._1c.g5.v8.dt.common.gef.drow2d.AbstractHighwayMatrix
-
- com._1c.g5.v8.dt.common.gef.drow2d.HighwayMatrixWave
-
- All Implemented Interfaces:
IHighwayMatrix
public class HighwayMatrixWave extends AbstractHighwayMatrix implements IHighwayMatrix
The implementation of theIHighwayMatrixusing wave algorithm.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.common.gef.drow2d.AbstractHighwayMatrix
AbstractHighwayMatrix.HighwayPtr
-
-
Constructor Summary
Constructors Constructor Description HighwayMatrixWave(List<Highway> highways)Constructor.
Creates the instance, using starting set of the highways.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoutePathgetPath(int indexFrom, org.eclipse.draw2d.geometry.Point start, int indexTo, org.eclipse.draw2d.geometry.Point end)Looks for a path, using algorithm of a wave.
If path is not found, thennullwill be returned.
Returned path contain thestartandendpoints.-
Methods inherited from class com._1c.g5.v8.dt.common.gef.drow2d.AbstractHighwayMatrix
addHighway, getHighway, getHighwayPtr, getHighways, getIdentifier, getIndex, getPoints, getSize, removeHighway
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.common.gef.drow2d.IHighwayMatrix
addHighway, getHighway, getHighways, getIdentifier, removeHighway
-
-
-
-
Constructor Detail
-
HighwayMatrixWave
public HighwayMatrixWave(List<Highway> highways)
Constructor.
Creates the instance, using starting set of the highways. Before a call of thegetPath(int, Point, int, Point)this set can be changed usingAbstractHighwayMatrix.addHighway(Highway)orAbstractHighwayMatrix.removeHighway(int).- Parameters:
highways- - starting set of the highways.
-
-
Method Detail
-
getPath
public RoutePath getPath(int indexFrom, org.eclipse.draw2d.geometry.Point start, int indexTo, org.eclipse.draw2d.geometry.Point end)
Looks for a path, using algorithm of a wave.
If path is not found, thennullwill be returned.
Returned path contain thestartandendpoints.- Specified by:
getPathin interfaceIHighwayMatrix- Parameters:
idFrom- the identifier of the starting highwaystart- the start pointidTo- the identifier of the ending highwayend- the end point and required direction from from this point- Returns:
- finded path or @{code null}
- See Also:
RoutePath
-
-