/// <summary> /// Search hierarchy to check if child is a descendent of this. /// </summary> /// <param name="child"></param> /// <returns>true if child is a descendent of this cluster</returns> public bool Contains(CvxHull child) { if (child.Parent == null) { return(false); } if (child.Parent == this) { return(true); } return(Contains(child.Parent)); }
/// <summary> /// Search hierarchy to check if child is a descendent of this. /// </summary> /// <param name="child"></param> /// <returns>true if child is a descendent of this cluster</returns> public bool Contains(CvxHull child) { if (child.Parent == null) { return false; } if (child.Parent == this) { return true; } return Contains(child.Parent); }