Method GetConnectedSet
GetConnectedSet<TPoint>(IExplicitShape<TPoint>, TPoint, Func<TPoint, IEnumerable<TPoint>>)
Gets the largest connected set in the grid from the given point.
public static HashSet<TPoint> GetConnectedSet<TPoint>(IExplicitShape<TPoint> grid, TPoint point, Func<TPoint, IEnumerable<TPoint>> getConnectedPoints)
Parameters
gridIExplicitShape<TPoint>The grid from which to get the connected set.
pointTPointPoint where the check start.
getConnectedPointsFunc<TPoint, IEnumerable<TPoint>>This function is used to get the connected Points.
Returns
- HashSet<TPoint>
Returns a list of points connected to the given point.
Type Parameters
TPointThe type of point of the grid that this algorithm takes.