diff --git a/docs/_sources/index.txt b/docs/_sources/index.txt index 83b78a4c..ef7866a6 100644 --- a/docs/_sources/index.txt +++ b/docs/_sources/index.txt @@ -3,6 +3,8 @@ Sprout C++ Libraries ############################################################################### +Contents: + .. toctree:: :maxdepth: 1 @@ -21,7 +23,6 @@ Library Documentation ******************************************************************************* | The starting point for the documentation of individual libraries is the :doc:`Libraries page <./libs/index>`, which gives a brief description of each library and links to its documentation. -| .. _sprout-project: ******************************************************************************* @@ -56,7 +57,7 @@ Author ******************************************************************************* | Bolero MURAKAMI `(Mail) `_ -| `[Website] `_ `[Twitter] `_ `[Facebook] `_ `[Blog] `_ `[Github] `_ `[SlideShare] `_ +| `Website `_ | `Twitter `_ | `Facebook `_ | `Blog `_ | `Github `_ | `SlideShare `_ .. _sprout-copyrights: ******************************************************************************* diff --git a/docs/_sources/libs/array/array/hash_value.txt b/docs/_sources/libs/array/array/hash_value.txt new file mode 100644 index 00000000..908975c5 --- /dev/null +++ b/docs/_sources/libs/array/array/hash_value.txt @@ -0,0 +1,47 @@ +.. _sprout-array-array-hash_value: +############################################################################### +hash_value +############################################################################### + +Interface +======================================== +.. sourcecode:: c++ + + template + inline SPROUT_CONSTEXPR std::size_t + hash_value(sprout::array const& v); + +Returns +======================================== + +| Equivalent to ``sprout::hash_range(v)``. + +Notes +======================================== + +| ``sprout::to_hash(v)`` is a valid call, because ``hash_value(v)`` ADL callable is defined. + +Examples +======================================== +.. sourcecode:: c++ + + #include + using namespace sprout; + + using type = array; + SPROUT_STATIC_CONSTEXPR auto input = type{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; + SPROUT_STATIC_CONSTEXPR auto h = sprout::to_hash(input); + static_assert(h, "hash value generated from array."); + +Complexity +======================================== + +| linear in N. +| Recursive function invocations in *O(logN)* (logarithmic) depth. + +Header +======================================== + +| ``sprout/array/tuple.hpp`` +| Convenience header: ``sprout/array.hpp`` + diff --git a/docs/_sources/libs/array/array/std-hash.txt b/docs/_sources/libs/array/array/std-hash.txt new file mode 100644 index 00000000..f24e60a5 --- /dev/null +++ b/docs/_sources/libs/array/array/std-hash.txt @@ -0,0 +1,46 @@ +.. _sprout-array-array-std-hash: +############################################################################### +std::hash +############################################################################### + +Interface +======================================== +.. sourcecode:: c++ + + namespace std { + template + struct hash >; + } + +Description +======================================== + +| Meet the requirements of class template hash. + +Member functions +---------------------------------------- + +======================================== =============================================================================== +function definition +======================================== =============================================================================== +operator() Equivalent to ``sprout::hash_range(v)``. +======================================== =============================================================================== + +Examples +======================================== +.. sourcecode:: c++ + + #include + using namespace sprout; + + using type = array; + SPROUT_STATIC_CONSTEXPR auto input = type{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; + SPROUT_STATIC_CONSTEXPR auto h = std::hash()(input); + static_assert(h, "hash value generated from array."); + +Header +======================================== + +| ``sprout/array/hash.hpp`` +| Convenience header: ``sprout/array.hpp`` + diff --git a/docs/_sources/libs/array/array/std-tuple_element.txt b/docs/_sources/libs/array/array/std-tuple_element.txt new file mode 100644 index 00000000..3f81c2bc --- /dev/null +++ b/docs/_sources/libs/array/array/std-tuple_element.txt @@ -0,0 +1,45 @@ +.. _sprout-array-array-std-tuple_element: +############################################################################### +std::tuple_element +############################################################################### + +Interface +======================================== +.. sourcecode:: c++ + + namespace std { + template + struct tuple_element >; + } + + // syntax + std::tuple_element >::type + +Requires +======================================== + +| ``I < N``. The program is ill-formed if I is out of bounds. + +Value +======================================== + +| The type T. + +Examples +======================================== +.. sourcecode:: c++ + + #include + #include + using namespace sprout; + + using type = array; + using element_type = std::tuple_element<0, type>::type; + static_assert(std::is_same::value, "tuple element type of array is int."); + +Header +======================================== + +| ``sprout/array/tuple.hpp`` +| Convenience header: ``sprout/array.hpp`` + diff --git a/docs/_sources/libs/array/array/std-tuple_size.txt b/docs/_sources/libs/array/array/std-tuple_size.txt new file mode 100644 index 00000000..e40907bd --- /dev/null +++ b/docs/_sources/libs/array/array/std-tuple_size.txt @@ -0,0 +1,44 @@ +.. _sprout-array-array-std-tuple_size: +############################################################################### +std::tuple_size +############################################################################### + +Interface +======================================== +.. sourcecode:: c++ + + namespace std { + template + struct tuple_size >; + } + + // syntax + std::tuple_size >::value + +Return type +======================================== + +| integral constant expression. + +Value +======================================== + +| N. + +Examples +======================================== +.. sourcecode:: c++ + + #include + using namespace sprout; + + using type = array; + SPROUT_STATIC_CONSTEXPR auto size = std::tuple_size::value; + static_assert(size == 10, "tuple size of array is 10."); + +Header +======================================== + +| ``sprout/array/tuple.hpp`` +| Convenience header: ``sprout/array.hpp`` + diff --git a/docs/_sources/libs/array/array/tuple_get.txt b/docs/_sources/libs/array/array/tuple_get.txt new file mode 100644 index 00000000..b678d229 --- /dev/null +++ b/docs/_sources/libs/array/array/tuple_get.txt @@ -0,0 +1,61 @@ +.. _sprout-array-array-tuple_get: +############################################################################### +tuple_get +############################################################################### + +Interface +======================================== +.. sourcecode:: c++ + + template + inline SPROUT_CONSTEXPR T& + tuple_get(sprout::array& t) SPROUT_NOEXCEPT; + + template + inline SPROUT_CONSTEXPR T const& + tuple_get(sprout::array const& t) SPROUT_NOEXCEPT; + + template + inline SPROUT_CONSTEXPR T&& + tuple_get(sprout::array&& t) SPROUT_NOEXCEPT; + +Requires +======================================== + +| ``I < N``. The program is ill-formed if I is out of bounds. + +Returns +======================================== + +| A reference to the Ith element of a, where indexing is zero-based. +| or +| A const reference to the Ith element of a, where indexing is zero-based. +| or +| Equivalent to ``return move(tuple_get(t));`` + +Notes +======================================== + +| ``sprout::get(t)`` (same as sprout::tuples::get) is a valid call, because ``tuple_get(t)`` ADL callable is defined. + +Examples +======================================== +.. sourcecode:: c++ + + #include + using namespace sprout; + + SPROUT_STATIC_CONSTEXPR auto input = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; + static_assert(sprout::get<5>(input) == 6, "an element at position 5 is 6."); + +Complexity +======================================== + +| Recursive function invocations in *O(1)* (constant) depth. + +Header +======================================== + +| ``sprout/array/tuple.hpp`` +| Convenience header: ``sprout/array.hpp`` + diff --git a/docs/_sources/libs/array/index.txt b/docs/_sources/libs/array/index.txt index 2a6e2ddd..ea4870f6 100644 --- a/docs/_sources/libs/array/index.txt +++ b/docs/_sources/libs/array/index.txt @@ -17,6 +17,11 @@ Sprout.Array to_array make_array make_common_array + array/std-tuple_size + array/std-tuple_element + array/tuple_get + array/std-hash + array/hash_value Description ======================================== @@ -86,6 +91,12 @@ function Hash support ---------------------------------------- +============================================================ =============================================================================== +class +============================================================ =============================================================================== +:doc:`std::hash <./array/std-hash>` +============================================================ =============================================================================== + ======================================== =============================================================================== function ======================================== =============================================================================== diff --git a/docs/index.html b/docs/index.html index a467e409..92504555 100644 --- a/docs/index.html +++ b/docs/index.html @@ -88,6 +88,7 @@

Sprout C++ Libraries

+

Contents:

  • Libraries
  • @@ -103,7 +104,6 @@

    Library Documentation

    The starting point for the documentation of individual libraries is the Libraries page, which gives a brief description of each library and links to its documentation.
    -

diff --git a/docs/libs/algorithm/index.html b/docs/libs/algorithm/index.html index 7ea97fb5..0581ecdc 100644 --- a/docs/libs/algorithm/index.html +++ b/docs/libs/algorithm/index.html @@ -28,7 +28,7 @@ - +