public IEnumerable <GdbObjectReference> GetIncidentEdges(GdbObjectReference nodeFeatureRef)
        {
            int nodeIndex;

            if (!NodeIndexesByNodeReference.TryGetValue(nodeFeatureRef, out nodeIndex))
            {
                yield break;
            }

            foreach (GdbObjectReference edgeRef in GetIncidentEdges(nodeIndex))
            {
                yield return(edgeRef);
            }
        }
        /// <summary>
        /// The <see cref="NodeIndexesByNodeReference"/> allows for a correlation of the node
        /// feature's GdbObjectReference with the Node.
        /// This can be used to include the junction features in a linear network into the graph.
        /// </summary>
        /// <param name="nodeFeature"></param>
        /// <returns>The index of the added node.</returns>
        public int AddNodeFeatureRef([NotNull] IFeature nodeFeature)
        {
            IPoint nodeLocation = (IPoint)nodeFeature.Shape;

            int nodeIndex;

            if (!TryGetNodeIndex(nodeLocation, out nodeIndex))
            {
                List <AdjacentNode> adjacentNodes;
                nodeIndex = AddNode(nodeLocation, out adjacentNodes);
            }

            NodeIndexesByNodeReference.Add(new GdbObjectReference(nodeFeature), nodeIndex);

            return(nodeIndex);
        }