pub(crate) fn circle_formation_predicate(
        site1: &VSE::SiteEvent<I, F>,
        site2: &VSE::SiteEvent<I, F>,
        site3: &VSE::SiteEvent<I, F>,
        circle: &VC::CircleEventType,
    ) -> bool {
        if !site1.is_segment() {
            if !site2.is_segment() {
                if !site3.is_segment() {
                    // (point, point, point) sites.
                    if !CircleExistencePredicate::<I, F>::ppp(site1, site2, site3) {
                        return false;
                    }
                    LazyCircleFormationFunctor::<I, F>::ppp(
                        site1.point0(),
                        site2.point0(),
                        site3.point0(),
                        circle,
                    );
                } else {
                    // (point, point, segment) sites.
                    if !CircleExistencePredicate::<I, F>::pps(site1, site2, site3, SiteIndex::Three)
                    {
                        return false;
                    }
                    LazyCircleFormationFunctor::<I, F>::pps(
                        site1,
                        site2,
                        site3,
                        SiteIndex::Three,
                        circle,
                    )
                }
            } else if !site3.is_segment() {
                // (point, segment, point) sites.
                if !CircleExistencePredicate::<I, F>::pps(site1, site3, site2, SiteIndex::Two) {
                    return false;
                }
                LazyCircleFormationFunctor::<I, F>::pps(
                    site1,
                    site3,
                    site2,
                    SiteIndex::Two,
                    circle,
                );
            } else {
                // (point, segment, segment) sites.
                if !CircleExistencePredicate::<I, F>::pss(site1, site2, site3, SiteIndex::One) {
                    return false;
                }
                LazyCircleFormationFunctor::<I, F>::pss(
                    site1,
                    site2,
                    site3,
                    SiteIndex::One,
                    circle,
                );
            }
        } else if !site2.is_segment() {
            if !site3.is_segment() {
                // (segment, point, point) sites.
                if !CircleExistencePredicate::<I, F>::pps(site2, site3, site1, SiteIndex::One) {
                    return false;
                }
                LazyCircleFormationFunctor::<I, F>::pps(
                    site2,
                    site3,
                    site1,
                    SiteIndex::One,
                    circle,
                );
            } else {
                // (segment, point, segment) sites.
                if !CircleExistencePredicate::<I, F>::pss(site2, site1, site3, SiteIndex::Two) {
                    return false;
                }
                LazyCircleFormationFunctor::<I, F>::pss(
                    site2,
                    site1,
                    site3,
                    SiteIndex::Two,
                    circle,
                );
            }
        } else if !site3.is_segment() {
            // (segment, segment, point) sites.
            if !CircleExistencePredicate::<I, F>::pss(site3, site1, site2, SiteIndex::Three) {
                return false;
            }
            LazyCircleFormationFunctor::<I, F>::pss(site3, site1, site2, SiteIndex::Three, circle);
        } else {
            // (segment, segment, segment) sites.
            if !CircleExistencePredicate::<I, F>::sss(site1, site2, site3) {
                return false;
            }
            LazyCircleFormationFunctor::<I, F>::sss(site1, site2, site3, circle);
        }

        if Self::lies_outside_vertical_segment(circle, site1)
            || Self::lies_outside_vertical_segment(circle, site2)
            || Self::lies_outside_vertical_segment(circle, site3)
        {
            return false;
        }
        #[cfg(all(feature = "geo", feature = "ce_corruption_check"))]
        CircleExistencePredicate::<I, F>::validate_circle_formation_predicate(
            site1, site2, site3, circle,
        );
        true
    }
/// Create a circle event from the given three sites.
/// Returns true if the circle event exists, else false.
/// If exists circle event is saved into the c_event variable.
Create a circle event from the given three sites.
Returns true if the circle event exists, else false.
If exists circle event is saved into the c_event variable.
Create a circle event from the given three sites . Returns true if the circle event exists else false . If exists circle event is saved into the c_event variable .
pub(crate) fn circle_formation_predicate(
        site1: &VSE::SiteEvent<I, F>,
        site2: &VSE::SiteEvent<I, F>,
        site3: &VSE::SiteEvent<I, F>,
        circle: &VC::CircleEventType,
    ) -> bool {
        if !site1.is_segment() {
            if !site2.is_segment() {
                if !site3.is_segment() {
                    // (point, point, point) sites.
                    if !CircleExistencePredicate::<I, F>::ppp(site1, site2, site3) {
                        return false;
                    }
                    LazyCircleFormationFunctor::<I, F>::ppp(
                        site1.point0(),
                        site2.point0(),
                        site3.point0(),
                        circle,
                    );
                } else {
                    // (point, point, segment) sites.
                    if !CircleExistencePredicate::<I, F>::pps(site1, site2, site3, SiteIndex::Three)
                    {
                        return false;
                    }
                    LazyCircleFormationFunctor::<I, F>::pps(
                        site1,
                        site2,
                        site3,
                        SiteIndex::Three,
                        circle,
                    )
                }
            } else if !site3.is_segment() {
                // (point, segment, point) sites.
                if !CircleExistencePredicate::<I, F>::pps(site1, site3, site2, SiteIndex::Two) {
                    return false;
                }
                LazyCircleFormationFunctor::<I, F>::pps(
                    site1,
                    site3,
                    site2,
                    SiteIndex::Two,
                    circle,
                );
            } else {
                // (point, segment, segment) sites.
                if !CircleExistencePredicate::<I, F>::pss(site1, site2, site3, SiteIndex::One) {
                    return false;
                }
                LazyCircleFormationFunctor::<I, F>::pss(
                    site1,
                    site2,
                    site3,
                    SiteIndex::One,
                    circle,
                );
            }
        } else if !site2.is_segment() {
            if !site3.is_segment() {
                // (segment, point, point) sites.
                if !CircleExistencePredicate::<I, F>::pps(site2, site3, site1, SiteIndex::One) {
                    return false;
                }
                LazyCircleFormationFunctor::<I, F>::pps(
                    site2,
                    site3,
                    site1,
                    SiteIndex::One,
                    circle,
                );
            } else {
                // (segment, point, segment) sites.
                if !CircleExistencePredicate::<I, F>::pss(site2, site1, site3, SiteIndex::Two) {
                    return false;
                }
                LazyCircleFormationFunctor::<I, F>::pss(
                    site2,
                    site1,
                    site3,
                    SiteIndex::Two,
                    circle,
                );
            }
        } else if !site3.is_segment() {
            // (segment, segment, point) sites.
            if !CircleExistencePredicate::<I, F>::pss(site3, site1, site2, SiteIndex::Three) {
                return false;
            }
            LazyCircleFormationFunctor::<I, F>::pss(site3, site1, site2, SiteIndex::Three, circle);
        } else {
            // (segment, segment, segment) sites.
            if !CircleExistencePredicate::<I, F>::sss(site1, site2, site3) {
                return false;
            }
            LazyCircleFormationFunctor::<I, F>::sss(site1, site2, site3, circle);
        }
        if Self::lies_outside_vertical_segment(circle, site1)
            || Self::lies_outside_vertical_segment(circle, site2)
            || Self::lies_outside_vertical_segment(circle, site3)
        {
            return false;
        }
        #[cfg(all(feature = "geo", feature = "ce_corruption_check"))]
        CircleExistencePredicate::<I, F>::validate_circle_formation_predicate(
            site1, site2, site3, circle,
        );
        true
    }
pub ( crate ) fn circle_formation_predicate ( site1 : & VSE :: SiteEvent < I , F > , site2 : & VSE :: SiteEvent < I , F > , site3 : & VSE :: SiteEvent < I , F > , circle : & VC :: CircleEventType , ) -> bool { if ! site1 . is_segment ( ) { if ! site2 . is_segment ( ) { if ! site3 . is_segment ( ) { // (point, point, point) sites. if ! CircleExistencePredicate :: < I , F > :: ppp ( site1 , site2 , site3 ) { return false ; } LazyCircleFormationFunctor :: < I , F > :: ppp ( site1 . point0 ( ) , site2 . point0 ( ) , site3 . point0 ( ) , circle , ) ; } else { // (point, point, segment) sites. if ! CircleExistencePredicate :: < I , F > :: pps ( site1 , site2 , site3 , SiteIndex :: Three ) { return false ; } LazyCircleFormationFunctor :: < I , F > :: pps ( site1 , site2 , site3 , SiteIndex :: Three , circle , ) } } else if ! site3 . is_segment ( ) { // (point, segment, point) sites. if ! CircleExistencePredicate :: < I , F > :: pps ( site1 , site3 , site2 , SiteIndex :: Two ) { return false ; } LazyCircleFormationFunctor :: < I , F > :: pps ( site1 , site3 , site2 , SiteIndex :: Two , circle , ) ; } else { // (point, segment, segment) sites. if ! CircleExistencePredicate :: < I , F > :: pss ( site1 , site2 , site3 , SiteIndex :: One ) { return false ; } LazyCircleFormationFunctor :: < I , F > :: pss ( site1 , site2 , site3 , SiteIndex :: One , circle , ) ; } } else if ! site2 . is_segment ( ) { if ! site3 . is_segment ( ) { // (segment, point, point) sites. if ! CircleExistencePredicate :: < I , F > :: pps ( site2 , site3 , site1 , SiteIndex :: One ) { return false ; } LazyCircleFormationFunctor :: < I , F > :: pps ( site2 , site3 , site1 , SiteIndex :: One , circle , ) ; } else { // (segment, point, segment) sites. if ! CircleExistencePredicate :: < I , F > :: pss ( site2 , site1 , site3 , SiteIndex :: Two ) { return false ; } LazyCircleFormationFunctor :: < I , F > :: pss ( site2 , site1 , site3 , SiteIndex :: Two , circle , ) ; } } else if ! site3 . is_segment ( ) { // (segment, segment, point) sites. if ! CircleExistencePredicate :: < I , F > :: pss ( site3 , site1 , site2 , SiteIndex :: Three ) { return false ; } LazyCircleFormationFunctor :: < I , F > :: pss ( site3 , site1 , site2 , SiteIndex :: Three , circle ) ; } else { // (segment, segment, segment) sites. if ! CircleExistencePredicate :: < I , F > :: sss ( site1 , site2 , site3 ) { return false ; } LazyCircleFormationFunctor :: < I , F > :: sss ( site1 , site2 , site3 , circle ) ; } if Self :: lies_outside_vertical_segment ( circle , site1 ) || Self :: lies_outside_vertical_segment ( circle , site2 ) || Self :: lies_outside_vertical_segment ( circle , site3 ) { return false ; } # [ cfg ( all ( feature " " feature " " ) ) ] CircleExistencePredicate :: < I , F > :: validate_circle_formation_predicate ( site1 , site2 , site3 , circle , ) ; true }
Create a circle event from the given three sites.
Create a circle event from the given three sites .
site1
&VSE::SiteEvent<I, F>
site2
&VSE::SiteEvent<I, F>
site3
&VSE::SiteEvent<I, F>
circle
&VC::CircleEventType