lemon/radix_sort.h
changeset 2069 d55adbe1fc78
parent 2033 7bf1f64962c2
child 2084 59769591eb60
equal deleted inserted replaced
6:12d0f3014b39 7:9490d2a94b8c
   206   /// or if the functor is not given it will use an identity function instead.
   206   /// or if the functor is not given it will use an identity function instead.
   207   ///
   207   ///
   208   /// This implemented radix sort is a special quick sort which pivot value
   208   /// This implemented radix sort is a special quick sort which pivot value
   209   /// is choosen to partite the items on the next bit. This way, let be
   209   /// is choosen to partite the items on the next bit. This way, let be
   210   /// \c c the maximal capacity and \c n the number of the items in
   210   /// \c c the maximal capacity and \c n the number of the items in
   211   /// the container, the time complexity of the algorithm \c O(log(c)*n)
   211   /// the container, the time complexity of the algorithm 
   212   /// and the additional space complexity is \c O(log(c)).
   212   /// \f$ O(\log(c)n) \f$ and the additional space complexity is 
       
   213   /// \f$ O(\log(c)) \f$.
   213   ///
   214   ///
   214   /// \param first The begin of the given range.
   215   /// \param first The begin of the given range.
   215   /// \param last The end of the given range.
   216   /// \param last The end of the given range.
   216   /// \param functor An adaptible unary function or a normal function which
   217   /// \param functor An adaptible unary function or a normal function which
   217   /// maps the items to any integer type which can be wheter signed or 
   218   /// maps the items to any integer type which can be wheter signed or 
   427   /// By the occurence number it is possible to copy the container
   428   /// By the occurence number it is possible to copy the container
   428   /// in the right order in \c O(n) time. The algorithm sorts the container
   429   /// in the right order in \c O(n) time. The algorithm sorts the container
   429   /// by each bytes in forward direction which sorts the container by the
   430   /// by each bytes in forward direction which sorts the container by the
   430   /// whole value. This way, let be \c c the maximal capacity of the integer 
   431   /// whole value. This way, let be \c c the maximal capacity of the integer 
   431   /// type and \c n the number of the items in
   432   /// type and \c n the number of the items in
   432   /// the container, the time complexity of the algorithm \c O(log(c)*n)
   433   /// the container, the time complexity of the algorithm \f$ O(\log(c)n) \f$
   433   /// and the additional space complexity is \c O(n).
   434   /// and the additional space complexity is \f$ O(n) \f$.
   434   ///
   435   ///
   435   /// This sorting algorithm is stable so the order of two equal element
   436   /// This sorting algorithm is stable so the order of two equal element
   436   /// stay in the same order.
   437   /// stay in the same order.
   437   ///
   438   ///
   438   /// \param first The begin of the given range.
   439   /// \param first The begin of the given range.