Beispiel #1
0
            //*************************************************************************
            //  Constructor: ReverseEnumerator()
            //
            /// <summary>
            /// Initializes a new instance of the ReverseEnumerator class.
            /// </summary>
            ///
            /// <param name="vertexCollection">
            /// Collection being enumerated.
            /// </param>
            //*************************************************************************

            protected internal ReverseEnumerator
            (
                VertexCollection vertexCollection
            )
            {
                Debug.Assert(vertexCollection != null);

                m_oVertexCollection = vertexCollection;

                m_oCurrentNode = null;

                AssertValid();
            }
Beispiel #2
0
        Graph
        (
            GraphDirectedness directedness
        )
            :
            base(m_oIDGenerator.GetNextID())
        {
            const String MethodName = "Constructor";

            this.ArgumentChecker.CheckArgumentIsDefined(
                MethodName, "directedness", directedness,
                typeof(GraphDirectedness));

            m_eDirectedness = directedness;

            m_oVertexCollection = new VertexCollection(this);
            m_oEdgeCollection   = new EdgeCollection(this);

            AssertValid();
        }
Beispiel #3
0
        //*************************************************************************
        //  Constructor: Graph()
        //
        /// <summary>
        /// Initializes a new instance of the <see cref="Graph" /> class with
        /// specified directedness.
        /// </summary>
        ///
        /// <param name="directedness">
        /// Specifies the type of edges that can be added to the graph.
        /// </param>
        //*************************************************************************
        public Graph(
            GraphDirectedness directedness
            )
            : base(m_oIDGenerator.GetNextID())
        {
            const String MethodName = "Constructor";

            this.ArgumentChecker.CheckArgumentIsDefined(
            MethodName, "directedness", directedness,
            typeof(GraphDirectedness) );

            m_eDirectedness = directedness;

            m_oVertexCollection = new VertexCollection(this);
            m_oEdgeCollection = new EdgeCollection(this);

            AssertValid();
        }