Analyzer.DConnectorMotifDetector.DVerticesMightBeAnchors C# (CSharp) Method

DVerticesMightBeAnchors() protected method

protected DVerticesMightBeAnchors ( ICollection oVertices, Int32 iDMinimum, Int32 iDMaximum ) : System.Boolean
oVertices ICollection
iDMinimum System.Int32
iDMaximum System.Int32
return System.Boolean
        protected Boolean DVerticesMightBeAnchors
            (ICollection<IVertex> oVertices, Int32 iDMinimum, Int32 iDMaximum)
        {
            Debug.Assert(oVertices != null);

            return (

                // There have to be between [iDMinimum, iDMaximum] anchor vertices.

                oVertices.Count >= iDMinimum && oVertices.Count <= iDMaximum
                &&

                // Anchor vertices can't have just one adjacent vertex.

                oVertices.All(oVertex => oVertex.AdjacentVertices.Count != 1)
                );
        }