Method GetLongestConnectedLine
GetLongestConnectedLine<TPoint>(IImplicitShape<TPoint>, TPoint, IEnumerable<IMap<TPoint, TPoint>>, Func<TPoint, TPoint, bool>)
Get the longest line of points connected to the given point
public static IEnumerable<TPoint> GetLongestConnectedLine<TPoint>(IImplicitShape<TPoint> grid, TPoint point, IEnumerable<IMap<TPoint, TPoint>> lineMaps, Func<TPoint, TPoint, bool> isNeighborsConnected)Parameters
- gridIImplicitShape<TPoint>
- Grid in which the calculations are made. 
- pointTPoint
- Point where the calculations start. 
- lineMapsIEnumerable<IMap<TPoint, TPoint>>
- List of maps that can generate lines iteratively. 
- isNeighborsConnectedFunc<TPoint, TPoint, bool>
- A functions that returns true or false, depending on whether two points can be considered connected when they are neighbors.For example, if you want rays of points that refer to cells of the same color, you can pass in a functions that compares the DefaultColors of cells. 
Returns
- IEnumerable<TPoint>
Type Parameters
- TPoint
- The type of point of the grid that this algorithm takes.