/// <summary>
            /// Fills the given array with the dynamic part of the edge-data.
            /// </summary>
            public int FillWithDynamicData(ref uint[] data)
            {
                var p = _currentEdgePointer + _graph._fixedEdgeDataSize;

                if (DirectedDynamicGraph.IsLastField(_graph._edges[p]))
                { // no dynamic data!
                    return(0);
                }

                var i = 0;

                p++;
                do
                {
                    data[i] = _graph._edges[p];
                    if (DirectedDynamicGraph.IsLastField(data[i]))
                    {
                        data[i] = DirectedDynamicGraph.RemoveFlags(data[i]);
                        break;
                    }
                    i++;
                    p++;
                } while (true);
                return(i + 1);
            }
 /// <summary>
 /// Fills the given array with the fixed data.
 /// </summary>
 public int FillWithData(ref uint[] data)
 {
     for (var i = 0; i < _graph._fixedEdgeDataSize && i < data.Length; i++)
     {
         data[i] = DirectedDynamicGraph.RemoveFlags(_graph._edges[_currentEdgePointer + 1 + i]);
     }
     return(System.Math.Min(_graph._fixedEdgeDataSize, data.Length));
 }
        /// <summary>
        /// Marks the edge at the given location as the last edge.
        /// </summary>
        /// <returns>False if there is no data at the given location, true otherwise.</returns>
        private bool MarkAsLast(uint edgePointer)
        {
            var data = _edges[edgePointer];

            if (data == NO_EDGE)
            {
                return(false);
            }
            while (!DirectedDynamicGraph.IsLastField(data))
            {
                edgePointer++;
                data = _edges[edgePointer];
            }
            data = DirectedDynamicGraph.RemoveFlags(data);
            _edges[edgePointer] = DirectedDynamicGraph.AddLastEdgeAndLastFieldFlag(
                data);
            return(true);
        }
 /// <summary>
 /// Gets all commonly used data fields in on go.
 /// </summary>
 public void GetData(out uint neighbour, out uint data0, out uint data1)
 {
     neighbour = _graph._edges[_currentEdgePointer];
     data0     = DirectedDynamicGraph.RemoveFlags(_graph._edges[_currentEdgePointer + 0 + 1]);
     data1     = DirectedDynamicGraph.RemoveFlags(_graph._edges[_currentEdgePointer + 1 + 1]);
 }