diff --git a/.clang-format b/.clang-format index 83cf6f6..028657c 100644 --- a/.clang-format +++ b/.clang-format @@ -5,7 +5,6 @@ Language: Cpp DerivePointerAlignment: false PointerAlignment: Left AccessModifierOffset: -4 -AlignAfterOpenBracket: AlwaysBreak AlignConsecutiveAssignments: false AlignEscapedNewlines: DontAlign AllowShortBlocksOnASingleLine: false @@ -27,7 +26,7 @@ BinPackArguments: false BinPackParameters: false ExperimentalAutoDetectBinPacking: false AllowAllParametersOfDeclarationOnNextLine: false - +AlignAfterOpenBracket: BlockIndent # AlwaysBreakAfterDefinitionReturnType: All BraceWrapping: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6e998f6..8c6ced2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,18 +1,18 @@ repos: - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 23.3.0 hooks: - id: black args: [--safe, --quiet, --line-length=100] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: debug-statements - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.3.0 + rev: v2.8.0 hooks: - id: pretty-format-yaml args: [--autofix, --indent, '2'] @@ -22,25 +22,34 @@ repos: - id: autoflake args: [--in-place, --remove-unused-variable, --remove-all-unused-imports] - repo: https://github.com/asottile/reorder_python_imports - rev: v3.1.0 + rev: v3.9.0 hooks: - id: reorder-python-imports - repo: https://github.com/asottile/pyupgrade - rev: v2.34.0 + rev: v3.3.1 hooks: - id: pyupgrade args: [--py36-plus] - repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 + rev: 6.0.0 hooks: - id: flake8 args: [--max-line-length=100] - repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.20.1 + rev: v2.2.0 hooks: - id: setup-cfg-fmt -- repo: https://github.com/pocc/pre-commit-hooks - rev: v1.3.5 +- repo: https://github.com/tdegeus/cpp_comment_format + rev: v0.2.0 + hooks: + - id: cpp_comment_format +- repo: https://github.com/pre-commit/mirrors-clang-format + rev: v16.0.0 hooks: - id: clang-format args: [-i] +- repo: https://github.com/tdegeus/conda_envfile + rev: v0.4.2 + hooks: + - id: conda_envfile_parse + files: environment.yaml diff --git a/examples/overview/overview.py b/examples/overview/overview.py index b707f72..9e7c78e 100644 --- a/examples/overview/overview.py +++ b/examples/overview/overview.py @@ -144,7 +144,6 @@ def plot_color_gradients(cmap_category, cmap_list, nrows): - fig, axes = plt.subplots(nrows=nrows) fig.subplots_adjust(top=0.95, bottom=0.01, left=0.2, right=0.99) axes[0].set_title(cmap_category + " colormaps", fontsize=14) @@ -177,7 +176,6 @@ def plot_color_gradients(cmap_category, cmap_list, nrows): def plot_color_gradients(cmap_category, cmap_list, nrows): - fig, axes = plt.subplots(nrows=nrows) fig.subplots_adjust(top=0.95, bottom=0.01, left=0.2, right=0.99) axes[0].set_title(cmap_category, fontsize=14) diff --git a/include/cppcolormap.h b/include/cppcolormap.h index cb8bc4a..0298b94 100644 --- a/include/cppcolormap.h +++ b/include/cppcolormap.h @@ -1,45 +1,45 @@ /** -\file -\copyright Copyright. Tom de Geus. All rights reserved. -\license This project is released under the GPLv3 License. -*/ + * @file + * @copyright Copyright. Tom de Geus. All rights reserved. + * \license This project is released under the GPLv3 License. + */ #ifndef CPPCOLORMAP_H #define CPPCOLORMAP_H /** -\cond -*/ + * \cond + */ #define Q(x) #x #define QUOTE(x) Q(x) #define CPPCOLORMAP_ASSERT_IMPL(expr, file, line) \ if (!(expr)) { \ throw std::runtime_error( \ - std::string(file) + ':' + std::to_string(line) + \ - ": assertion failed (" #expr ") \n\t"); \ - } -/** -\endcond -*/ - -/** -All assertions are implementation as: - - GMATTENSOR_ASSERT(...) - -They can be enabled by: - - #define GMATTENSOR_ENABLE_ASSERT - -(before including GMatTensor). -The advantage is that: - -- File and line-number are displayed if the assertion fails. -- GMatTensor's assertions can be enabled/disabled independently from those of other libraries. - -\throw std::runtime_error -*/ + std::string(file) + ':' + std::to_string(line) + ": assertion failed (" #expr ") \n\t" \ + ); \ + } +/** + * \endcond + */ + +/** + * All assertions are implementation as: + * + * GMATTENSOR_ASSERT(...) + * + * They can be enabled by: + * + * #define GMATTENSOR_ENABLE_ASSERT + * + * (before including GMatTensor). + * The advantage is that: + * + * - File and line-number are displayed if the assertion fails. + * - GMatTensor's assertions can be enabled/disabled independently from those of other libraries. + * + * \throw std::runtime_error + */ #ifdef CPPCOLORMAP_ENABLE_ASSERT #define CPPCOLORMAP_ASSERT(expr) CPPCOLORMAP_ASSERT_IMPL(expr, __FILE__, __LINE__) #else @@ -47,37 +47,37 @@ The advantage is that: #endif /** -Current version. - -Either: - -- Configure using CMake at install time. Internally uses:: - - python -c "from setuptools_scm import get_version; print(get_version())" - -- Define externally using:: - - MYVERSION=`python -c "from setuptools_scm import get_version; print(get_version())"` - -DCPPCOLORMAP_VERSION="$MYVERSION" - - From the root of this project. This is what ``setup.py`` does. - -Note that both ``CMakeLists.txt`` and ``setup.py`` will construct the version using -``setuptools_scm``. Tip: use the environment variable ``SETUPTOOLS_SCM_PRETEND_VERSION`` to -overwrite the automatic version. -*/ + * Current version. + * + * Either: + * + * - Configure using CMake at install time. Internally uses:: + * + * python -c "from setuptools_scm import get_version; print(get_version())" + * + * - Define externally using:: + * + * MYVERSION=`python -c "from setuptools_scm import get_version; print(get_version())"` + * -DCPPCOLORMAP_VERSION="$MYVERSION" + * + * From the root of this project. This is what ``setup.py`` does. + * + * Note that both ``CMakeLists.txt`` and ``setup.py`` will construct the version using + * ``setuptools_scm``. Tip: use the environment variable ``SETUPTOOLS_SCM_PRETEND_VERSION`` to + * overwrite the automatic version. + */ #ifndef CPPCOLORMAP_VERSION #define CPPCOLORMAP_VERSION "@PROJECT_VERSION@" #endif /** -\cond -*/ + * \cond + */ // use "M_PI" from "math.h" #define _USE_MATH_DEFINES /** -\endcond -*/ + * \endcond + */ #include #include @@ -95,23 +95,23 @@ overwrite the automatic version. namespace cppcolormap { /** -Container type. -*/ + * Container type. + */ namespace array_type { #ifdef CPPCOLORMAP_USE_XTENSOR_PYTHON /** -Fixed (static) rank array. -*/ + * Fixed (static) rank array. + */ template using tensor = xt::pytensor; #else /** -Fixed (static) rank array. -*/ + * Fixed (static) rank array. + */ template using tensor = xt::xtensor; @@ -131,24 +131,24 @@ inline std::string unquote(const std::string& arg) } // namespace detail /** -Return version string. E.g.: `"0.1.0"`. -\return String. -*/ + * Return version string. E.g.: `"0.1.0"`. + * @return String. + */ inline std::string version() { return detail::unquote(std::string(QUOTE(CPPCOLORMAP_VERSION))); } /** -Return versions of this library and of all of its dependencies. -The output is a list of strings, e.g. - - "cppcolormap=1.0.0", - "xtensor=0.20.1" - ... - -\return List of strings. -*/ + * Return versions of this library and of all of its dependencies. + * The output is a list of strings, e.g. + * + * "cppcolormap=1.0.0", + * "xtensor=0.20.1" + * ... + * + * @return List of strings. + */ inline std::vector version_dependencies() { std::vector ret; @@ -158,7 +158,8 @@ inline std::vector version_dependencies() ret.push_back( "xtensor=" + detail::unquote(std::string(QUOTE(XTENSOR_VERSION_MAJOR))) + "." + detail::unquote(std::string(QUOTE(XTENSOR_VERSION_MINOR))) + "." + - detail::unquote(std::string(QUOTE(XTENSOR_VERSION_PATCH)))); + detail::unquote(std::string(QUOTE(XTENSOR_VERSION_PATCH))) + ); return ret; } @@ -166,13 +167,13 @@ inline std::vector version_dependencies() namespace detail { /** -See: https://www.codespeedy.com/convert-rgb-to-hex-color-code-in-cpp - -\param r Red [0..255]. -\param g Green [0..255]. -\param b Blue [0..255]. -\return Hex string. -*/ + * See: https://www.codespeedy.com/convert-rgb-to-hex-color-code-in-cpp + * + * @param r Red [0..255]. + * @param g Green [0..255]. + * @param b Blue [0..255]. + * @return Hex string. + */ std::string rgb2hex(size_t r, size_t g, size_t b) { std::stringstream ss; @@ -181,11 +182,11 @@ std::string rgb2hex(size_t r, size_t g, size_t b) } /** -See: https://stackoverflow.com/questions/28104559/arduino-strange-behavior-converting-hex-to-rgb - -\param hex Hex string. -\return RGB data. -*/ + * See: https://stackoverflow.com/questions/28104559/arduino-strange-behavior-converting-hex-to-rgb + * + * @param hex Hex string. + * @return RGB data. + */ array_type::tensor hex2rgb(std::string hex) { if (hex.at(0) == '#') { @@ -210,11 +211,11 @@ array_type::tensor hex2rgb(std::string hex) } // namespace detail /** -Convert RGB -> HEX. - -\param arg RGB data (values between 0 and 1). -\returns Vector of strings. -*/ + * Convert RGB -> HEX. + * + * @param arg RGB data (values between 0 and 1). + * @returns Vector of strings. + */ template ::value != 1, int> = 0> std::vector rgb2hex(const T& arg) { @@ -228,18 +229,19 @@ std::vector rgb2hex(const T& arg) ret.push_back(detail::rgb2hex( static_cast(arg(i, 0) * 255.0), static_cast(arg(i, 1) * 255.0), - static_cast(arg(i, 2) * 255.0))); + static_cast(arg(i, 2) * 255.0) + )); } return ret; } /** -Convert RGB -> HEX. - -\param arg RGB data (values between 0 and 1). -\returns String. -*/ + * Convert RGB -> HEX. + * + * @param arg RGB data (values between 0 and 1). + * @returns String. + */ template ::value == 1, int> = 0> std::string rgb2hex(const T& arg) { @@ -249,15 +251,16 @@ std::string rgb2hex(const T& arg) return detail::rgb2hex( static_cast(arg(0) * 255.0), static_cast(arg(1) * 255.0), - static_cast(arg(2) * 255.0)); + static_cast(arg(2) * 255.0) + ); } /** -Convert HEX -> RGB. - -\param arg HEX data. -\returns RGB data. -*/ + * Convert HEX -> RGB. + * + * @param arg HEX data. + * @returns RGB data. + */ array_type::tensor hex2rgb(const std::vector& arg) { array_type::tensor out = xt::empty({arg.size(), size_t(3)}); @@ -270,23 +273,23 @@ array_type::tensor hex2rgb(const std::vector& arg) } /** -Convert HEX -> RGB. - -\param arg HEX data. -\returns RGB data. -*/ + * Convert HEX -> RGB. + * + * @param arg HEX data. + * @returns RGB data. + */ array_type::tensor hex2rgb(const std::string& arg) { return detail::hex2rgb(arg) / 255.0; } /** -Interpolate the individual colours. - -\param arg RGB data. -\param N Number of colors to output. -\returns RGB data. -*/ + * Interpolate the individual colours. + * + * @param arg RGB data. + * @param N Number of colors to output. + * @returns RGB data. + */ template > inline R interp(const T& arg, size_t N) { @@ -369,13 +372,13 @@ struct as_colors_impl> { } // namespace detail /** -Convert data to colors using a colormap. - -\param data The data. -\param colors The colormap, e.g. ``cppcolormap::jet()``. -\param vmin The lower limit of the color-axis. -\param vmax The upper limit of the color-axis. -*/ + * Convert data to colors using a colormap. + * + * @param data The data. + * @param colors The colormap, e.g. ``cppcolormap::jet()``. + * @param vmin The lower limit of the color-axis. + * @param vmax The upper limit of the color-axis. + */ template inline auto as_colors(const E& data, const C& colors, S vmin, S vmax) { @@ -383,11 +386,11 @@ inline auto as_colors(const E& data, const C& colors, S vmin, S vmax) } /** -Convert data to colors using a colormap. - -\param data The data. -\param colors The colormap, e.g. ``cppcolormap::jet()``. -*/ + * Convert data to colors using a colormap. + * + * @param data The data. + * @param colors The colormap, e.g. ``cppcolormap::jet()``. + */ template inline auto as_colors(const E& data, const C& colors) { @@ -395,11 +398,11 @@ inline auto as_colors(const E& data, const C& colors) } /** -Qualitative colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Qualitative colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Accent(size_t N = 8) { // clang-format off @@ -419,11 +422,11 @@ inline array_type::tensor Accent(size_t N = 8) } /** -Qualitative colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Qualitative colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Dark2(size_t N = 8) { // clang-format off @@ -443,11 +446,11 @@ inline array_type::tensor Dark2(size_t N = 8) } /** -Qualitative colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Qualitative colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Paired(size_t N = 12) { // clang-format off @@ -471,11 +474,11 @@ inline array_type::tensor Paired(size_t N = 12) } /** -Qualitative colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Qualitative colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Spectral(size_t N = 11) { // clang-format off @@ -498,11 +501,11 @@ inline array_type::tensor Spectral(size_t N = 11) } /** -Qualitative colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Qualitative colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Pastel1(size_t N = 9) { // clang-format off @@ -523,11 +526,11 @@ inline array_type::tensor Pastel1(size_t N = 9) } /** -Qualitative colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Qualitative colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Pastel2(size_t N = 8) { // clang-format off @@ -547,11 +550,11 @@ inline array_type::tensor Pastel2(size_t N = 8) } /** -Qualitative colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Qualitative colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Set1(size_t N = 9) { // clang-format off @@ -572,11 +575,11 @@ inline array_type::tensor Set1(size_t N = 9) } /** -Qualitative colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Qualitative colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Set2(size_t N = 8) { // clang-format off @@ -596,11 +599,11 @@ inline array_type::tensor Set2(size_t N = 8) } /** -Qualitative colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Qualitative colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Set3(size_t N = 12) { // clang-format off @@ -624,11 +627,11 @@ inline array_type::tensor Set3(size_t N = 12) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Blues(size_t N = 9) { // clang-format off @@ -649,11 +652,11 @@ inline array_type::tensor Blues(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Greens(size_t N = 9) { // clang-format off @@ -674,11 +677,11 @@ inline array_type::tensor Greens(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Greys(size_t N = 2) { // clang-format off @@ -692,11 +695,11 @@ inline array_type::tensor Greys(size_t N = 2) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Oranges(size_t N = 9) { // clang-format off @@ -717,11 +720,11 @@ inline array_type::tensor Oranges(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Purples(size_t N = 9) { // clang-format off @@ -742,11 +745,11 @@ inline array_type::tensor Purples(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Reds(size_t N = 9) { // clang-format off @@ -767,11 +770,11 @@ inline array_type::tensor Reds(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor BuPu(size_t N = 9) { // clang-format off @@ -792,11 +795,11 @@ inline array_type::tensor BuPu(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor GnBu(size_t N = 9) { // clang-format off @@ -817,11 +820,11 @@ inline array_type::tensor GnBu(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PuBu(size_t N = 9) { // clang-format off @@ -842,11 +845,11 @@ inline array_type::tensor PuBu(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PuBuGn(size_t N = 9) { // clang-format off @@ -867,11 +870,11 @@ inline array_type::tensor PuBuGn(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PuRd(size_t N = 9) { // clang-format off @@ -892,11 +895,11 @@ inline array_type::tensor PuRd(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RdPu(size_t N = 9) { // clang-format off @@ -917,11 +920,11 @@ inline array_type::tensor RdPu(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor OrRd(size_t N = 9) { // clang-format off @@ -942,11 +945,11 @@ inline array_type::tensor OrRd(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RdOrYl(size_t N = 9) { // clang-format off @@ -967,11 +970,11 @@ inline array_type::tensor RdOrYl(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor YlGn(size_t N = 9) { // clang-format off @@ -992,11 +995,11 @@ inline array_type::tensor YlGn(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor YlGnBu(size_t N = 9) { // clang-format off @@ -1017,11 +1020,11 @@ inline array_type::tensor YlGnBu(size_t N = 9) } /** -Sequential colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Sequential colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor YlOrRd(size_t N = 9) { // clang-format off @@ -1042,11 +1045,11 @@ inline array_type::tensor YlOrRd(size_t N = 9) } /** -Diverging colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Diverging colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor BrBG(size_t N = 11) { // clang-format off @@ -1069,11 +1072,11 @@ inline array_type::tensor BrBG(size_t N = 11) } /** -Diverging colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Diverging colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PuOr(size_t N = 11) { // clang-format off @@ -1096,11 +1099,11 @@ inline array_type::tensor PuOr(size_t N = 11) } /** -Diverging colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Diverging colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RdBu(size_t N = 11) { // clang-format off @@ -1123,11 +1126,11 @@ inline array_type::tensor RdBu(size_t N = 11) } /** -Diverging colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Diverging colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RdGy(size_t N = 11) { // clang-format off @@ -1150,11 +1153,11 @@ inline array_type::tensor RdGy(size_t N = 11) } /** -Diverging colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Diverging colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RdYlBu(size_t N = 11) { // clang-format off @@ -1177,11 +1180,11 @@ inline array_type::tensor RdYlBu(size_t N = 11) } /** -Diverging colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Diverging colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RdYlGn(size_t N = 11) { // clang-format off @@ -1204,11 +1207,11 @@ inline array_type::tensor RdYlGn(size_t N = 11) } /** -Diverging colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Diverging colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PiYG(size_t N = 11) { // clang-format off @@ -1231,11 +1234,11 @@ inline array_type::tensor PiYG(size_t N = 11) } /** -Diverging colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Diverging colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PRGn(size_t N = 11) { // clang-format off @@ -1281,7 +1284,8 @@ inline array_type::tensor from_anchor( size_t N, const array_type::tensor& r, const array_type::tensor& g, - const array_type::tensor& b) + const array_type::tensor& b +) { using return_type = array_type::tensor; using shape_type = return_type::shape_type::value_type; @@ -1296,11 +1300,11 @@ inline array_type::tensor from_anchor( } // namespace detail /** -matplotlib colormap, from anchor. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap, from anchor. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor spring(size_t N = 256) { // clang-format off @@ -1321,11 +1325,11 @@ inline array_type::tensor spring(size_t N = 256) } /** -matplotlib colormap, from anchor. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap, from anchor. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor summer(size_t N = 256) { // clang-format off @@ -1346,11 +1350,11 @@ inline array_type::tensor summer(size_t N = 256) } /** -matplotlib colormap, from anchor. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap, from anchor. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor autumn(size_t N = 256) { // clang-format off @@ -1371,11 +1375,11 @@ inline array_type::tensor autumn(size_t N = 256) } /** -matplotlib colormap, from anchor. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap, from anchor. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor winter(size_t N = 256) { // clang-format off @@ -1396,11 +1400,11 @@ inline array_type::tensor winter(size_t N = 256) } /** -matplotlib colormap, from anchor. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap, from anchor. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor bone(size_t N = 256) { // clang-format off @@ -1425,11 +1429,11 @@ inline array_type::tensor bone(size_t N = 256) } /** -matplotlib colormap, from anchor. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap, from anchor. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor cool(size_t N = 256) { // clang-format off @@ -1450,11 +1454,11 @@ inline array_type::tensor cool(size_t N = 256) } /** -matplotlib colormap, from anchor. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap, from anchor. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor hot(size_t N = 256) { // clang-format off @@ -1479,11 +1483,11 @@ inline array_type::tensor hot(size_t N = 256) } /** -matplotlib colormap, from anchor. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap, from anchor. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor copper(size_t N = 256) { // clang-format off @@ -1505,11 +1509,11 @@ inline array_type::tensor copper(size_t N = 256) } /** -matplotlib colormap, from anchor. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap, from anchor. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor hsv(size_t N = 256) { // clang-format off @@ -1548,11 +1552,11 @@ inline array_type::tensor hsv(size_t N = 256) } /** -matplotlib colormap, from anchor. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap, from anchor. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor nipy_spectral(size_t N = 256) { // clang-format off @@ -1630,11 +1634,11 @@ inline array_type::tensor nipy_spectral(size_t N = 256) } /** -matplotlib colormap, from anchor. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap, from anchor. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor jet(size_t N = 256) { // clang-format off @@ -1689,11 +1693,11 @@ inline array_type::tensor from_fraction(size_t N, const array_type::t } // namespace detail /** -matplotlib colormap, from fraction. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap, from fraction. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor terrain(size_t N = 6) { array_type::tensor data = { @@ -2026,11 +2030,11 @@ inline array_type::tensor gnu_palette(size_t i, const array_type::ten } // namespace detail /** -GNU plot colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * GNU plot colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor afmhot(size_t N = 256) { std::array shape = {N, 3}; @@ -2043,11 +2047,11 @@ inline array_type::tensor afmhot(size_t N = 256) } /** -matplotlib colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor magma(size_t N = 256) { // clang-format off @@ -2315,11 +2319,11 @@ inline array_type::tensor magma(size_t N = 256) } /** -matplotlib colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor inferno(size_t N = 256) { // clang-format off @@ -2587,11 +2591,11 @@ inline array_type::tensor inferno(size_t N = 256) } /** -matplotlib colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor plasma(size_t N = 256) { // clang-format off @@ -2859,11 +2863,11 @@ inline array_type::tensor plasma(size_t N = 256) } /** -matplotlib colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor viridis(size_t N = 256) { // clang-format off @@ -3131,11 +3135,11 @@ inline array_type::tensor viridis(size_t N = 256) } /** -matplotlib colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * matplotlib colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor seismic(size_t N = 5) { // clang-format off @@ -3152,11 +3156,11 @@ inline array_type::tensor seismic(size_t N = 5) } /** -Monotone colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Monotone colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor White(size_t N = 1) { array_type::tensor data = {{255, 255, 255}}; @@ -3164,11 +3168,11 @@ inline array_type::tensor White(size_t N = 1) } /** -Monotone colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Monotone colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Grey(size_t N = 1) { array_type::tensor data = {{0.5, 0.5, 0.5}}; @@ -3176,11 +3180,11 @@ inline array_type::tensor Grey(size_t N = 1) } /** -Monotone colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Monotone colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Black(size_t N = 1) { array_type::tensor data = {{0, 0, 0}}; @@ -3188,11 +3192,11 @@ inline array_type::tensor Black(size_t N = 1) } /** -Monotone colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Monotone colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Red(size_t N = 1) { array_type::tensor data = {{255, 0, 0}}; @@ -3200,11 +3204,11 @@ inline array_type::tensor Red(size_t N = 1) } /** -Monotone colormap. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Monotone colormap. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Blue(size_t N = 1) { array_type::tensor data = {{0, 0, 255}}; @@ -3212,11 +3216,11 @@ inline array_type::tensor Blue(size_t N = 1) } /** -Eindhoven University of Technology. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Eindhoven University of Technology. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor tuewarmred(size_t N = 1) { array_type::tensor data = {{247, 49, 49}}; @@ -3224,11 +3228,11 @@ inline array_type::tensor tuewarmred(size_t N = 1) } /** -Eindhoven University of Technology. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Eindhoven University of Technology. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor tuedarkblue(size_t N = 1) { array_type::tensor data = {{16, 16, 115}}; @@ -3236,11 +3240,11 @@ inline array_type::tensor tuedarkblue(size_t N = 1) } /** -Eindhoven University of Technology. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Eindhoven University of Technology. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor tueblue(size_t N = 1) { array_type::tensor data = {{0, 102, 204}}; @@ -3248,11 +3252,11 @@ inline array_type::tensor tueblue(size_t N = 1) } /** -Eindhoven University of Technology. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Eindhoven University of Technology. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor tuelightblue(size_t N = 1) { array_type::tensor data = {{0, 162, 222}}; @@ -3260,11 +3264,11 @@ inline array_type::tensor tuelightblue(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Apricot(size_t N = 1) { array_type::tensor data = {{251, 185, 130}}; @@ -3272,11 +3276,11 @@ inline array_type::tensor Apricot(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Aquamarine(size_t N = 1) { array_type::tensor data = {{0, 181, 190}}; @@ -3284,11 +3288,11 @@ inline array_type::tensor Aquamarine(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Bittersweet(size_t N = 1) { array_type::tensor data = {{192, 79, 23}}; @@ -3296,11 +3300,11 @@ inline array_type::tensor Bittersweet(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor BlueGreen(size_t N = 1) { array_type::tensor data = {{0, 179, 184}}; @@ -3308,11 +3312,11 @@ inline array_type::tensor BlueGreen(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor BlueViolet(size_t N = 1) { array_type::tensor data = {{71, 57, 146}}; @@ -3320,11 +3324,11 @@ inline array_type::tensor BlueViolet(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor BrickRed(size_t N = 1) { array_type::tensor data = {{182, 50, 28}}; @@ -3332,11 +3336,11 @@ inline array_type::tensor BrickRed(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Brown(size_t N = 1) { array_type::tensor data = {{121, 37, 0}}; @@ -3344,11 +3348,11 @@ inline array_type::tensor Brown(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor BurntOrange(size_t N = 1) { array_type::tensor data = {{247, 146, 29}}; @@ -3356,11 +3360,11 @@ inline array_type::tensor BurntOrange(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor CadetBlue(size_t N = 1) { array_type::tensor data = {{116, 114, 154}}; @@ -3368,11 +3372,11 @@ inline array_type::tensor CadetBlue(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor CarnationPink(size_t N = 1) { array_type::tensor data = {{242, 130, 180}}; @@ -3380,11 +3384,11 @@ inline array_type::tensor CarnationPink(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Cerulean(size_t N = 1) { array_type::tensor data = {{0, 162, 227}}; @@ -3392,11 +3396,11 @@ inline array_type::tensor Cerulean(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor CornflowerBlue(size_t N = 1) { array_type::tensor data = {{65, 176, 228}}; @@ -3404,11 +3408,11 @@ inline array_type::tensor CornflowerBlue(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Cyan(size_t N = 1) { array_type::tensor data = {{0, 174, 239}}; @@ -3416,11 +3420,11 @@ inline array_type::tensor Cyan(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Dandelion(size_t N = 1) { array_type::tensor data = {{253, 188, 66}}; @@ -3428,11 +3432,11 @@ inline array_type::tensor Dandelion(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor DarkOrchid(size_t N = 1) { array_type::tensor data = {{164, 83, 138}}; @@ -3440,11 +3444,11 @@ inline array_type::tensor DarkOrchid(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Emerald(size_t N = 1) { array_type::tensor data = {{0, 169, 157}}; @@ -3452,11 +3456,11 @@ inline array_type::tensor Emerald(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor ForestGreen(size_t N = 1) { array_type::tensor data = {{0, 155, 85}}; @@ -3464,11 +3468,11 @@ inline array_type::tensor ForestGreen(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Fuchsia(size_t N = 1) { array_type::tensor data = {{140, 54, 140}}; @@ -3476,11 +3480,11 @@ inline array_type::tensor Fuchsia(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Goldenrod(size_t N = 1) { array_type::tensor data = {{255, 223, 66}}; @@ -3488,11 +3492,11 @@ inline array_type::tensor Goldenrod(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Gray(size_t N = 1) { array_type::tensor data = {{148, 150, 152}}; @@ -3500,11 +3504,11 @@ inline array_type::tensor Gray(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Green(size_t N = 1) { array_type::tensor data = {{0, 166, 79}}; @@ -3512,11 +3516,11 @@ inline array_type::tensor Green(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor GreenYellow(size_t N = 1) { array_type::tensor data = {{223, 230, 116}}; @@ -3524,11 +3528,11 @@ inline array_type::tensor GreenYellow(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor JungleGreen(size_t N = 1) { array_type::tensor data = {{0, 169, 154}}; @@ -3536,11 +3540,11 @@ inline array_type::tensor JungleGreen(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Lavender(size_t N = 1) { array_type::tensor data = {{244, 158, 196}}; @@ -3548,11 +3552,11 @@ inline array_type::tensor Lavender(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor LimeGreen(size_t N = 1) { array_type::tensor data = {{141, 199, 62}}; @@ -3560,11 +3564,11 @@ inline array_type::tensor LimeGreen(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Magenta(size_t N = 1) { array_type::tensor data = {{236, 0, 140}}; @@ -3572,11 +3576,11 @@ inline array_type::tensor Magenta(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Mahogany(size_t N = 1) { array_type::tensor data = {{169, 52, 31}}; @@ -3584,11 +3588,11 @@ inline array_type::tensor Mahogany(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Maroon(size_t N = 1) { array_type::tensor data = {{175, 50, 53}}; @@ -3596,11 +3600,11 @@ inline array_type::tensor Maroon(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Melon(size_t N = 1) { array_type::tensor data = {{248, 158, 123}}; @@ -3608,11 +3612,11 @@ inline array_type::tensor Melon(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor MidnightBlue(size_t N = 1) { array_type::tensor data = {{0, 103, 149}}; @@ -3620,11 +3624,11 @@ inline array_type::tensor MidnightBlue(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Mulberry(size_t N = 1) { array_type::tensor data = {{169, 60, 147}}; @@ -3632,11 +3636,11 @@ inline array_type::tensor Mulberry(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor NavyBlue(size_t N = 1) { array_type::tensor data = {{0, 110, 184}}; @@ -3644,11 +3648,11 @@ inline array_type::tensor NavyBlue(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor OliveGreen(size_t N = 1) { array_type::tensor data = {{60, 128, 49}}; @@ -3656,11 +3660,11 @@ inline array_type::tensor OliveGreen(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Orange(size_t N = 1) { array_type::tensor data = {{245, 129, 55}}; @@ -3668,11 +3672,11 @@ inline array_type::tensor Orange(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor OrangeRed(size_t N = 1) { array_type::tensor data = {{237, 19, 90}}; @@ -3680,11 +3684,11 @@ inline array_type::tensor OrangeRed(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Orchid(size_t N = 1) { array_type::tensor data = {{175, 114, 176}}; @@ -3692,11 +3696,11 @@ inline array_type::tensor Orchid(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Peach(size_t N = 1) { array_type::tensor data = {{247, 150, 90}}; @@ -3704,11 +3708,11 @@ inline array_type::tensor Peach(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Periwinkle(size_t N = 1) { array_type::tensor data = {{121, 119, 184}}; @@ -3716,11 +3720,11 @@ inline array_type::tensor Periwinkle(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PineGreen(size_t N = 1) { array_type::tensor data = {{0, 139, 114}}; @@ -3728,11 +3732,11 @@ inline array_type::tensor PineGreen(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Plum(size_t N = 1) { array_type::tensor data = {{146, 38, 143}}; @@ -3740,11 +3744,11 @@ inline array_type::tensor Plum(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor ProcessBlue(size_t N = 1) { array_type::tensor data = {{0, 176, 240}}; @@ -3752,11 +3756,11 @@ inline array_type::tensor ProcessBlue(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Purple(size_t N = 1) { array_type::tensor data = {{153, 71, 155}}; @@ -3764,11 +3768,11 @@ inline array_type::tensor Purple(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RawSienna(size_t N = 1) { array_type::tensor data = {{151, 64, 6}}; @@ -3776,11 +3780,11 @@ inline array_type::tensor RawSienna(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RedOrange(size_t N = 1) { array_type::tensor data = {{242, 96, 53}}; @@ -3788,11 +3792,11 @@ inline array_type::tensor RedOrange(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RedViolet(size_t N = 1) { array_type::tensor data = {{161, 36, 107}}; @@ -3800,11 +3804,11 @@ inline array_type::tensor RedViolet(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Rhodamine(size_t N = 1) { array_type::tensor data = {{239, 85, 159}}; @@ -3812,11 +3816,11 @@ inline array_type::tensor Rhodamine(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RoyalBlue(size_t N = 1) { array_type::tensor data = {{0, 113, 188}}; @@ -3824,11 +3828,11 @@ inline array_type::tensor RoyalBlue(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RoyalPurple(size_t N = 1) { array_type::tensor data = {{97, 63, 153}}; @@ -3836,11 +3840,11 @@ inline array_type::tensor RoyalPurple(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RubineRed(size_t N = 1) { array_type::tensor data = {{237, 1, 125}}; @@ -3848,11 +3852,11 @@ inline array_type::tensor RubineRed(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Salmon(size_t N = 1) { array_type::tensor data = {{246, 146, 137}}; @@ -3860,11 +3864,11 @@ inline array_type::tensor Salmon(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor SeaGreen(size_t N = 1) { array_type::tensor data = {{63, 188, 157}}; @@ -3872,11 +3876,11 @@ inline array_type::tensor SeaGreen(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Sepia(size_t N = 1) { array_type::tensor data = {{103, 24, 0}}; @@ -3884,11 +3888,11 @@ inline array_type::tensor Sepia(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor SkyBlue(size_t N = 1) { array_type::tensor data = {{70, 197, 221}}; @@ -3896,11 +3900,11 @@ inline array_type::tensor SkyBlue(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor SpringGreen(size_t N = 1) { array_type::tensor data = {{198, 220, 103}}; @@ -3908,11 +3912,11 @@ inline array_type::tensor SpringGreen(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Tan(size_t N = 1) { array_type::tensor data = {{218, 157, 118}}; @@ -3920,11 +3924,11 @@ inline array_type::tensor Tan(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor TealBlue(size_t N = 1) { array_type::tensor data = {{0, 174, 179}}; @@ -3932,11 +3936,11 @@ inline array_type::tensor TealBlue(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Thistle(size_t N = 1) { array_type::tensor data = {{216, 131, 183}}; @@ -3944,11 +3948,11 @@ inline array_type::tensor Thistle(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Turquoise(size_t N = 1) { array_type::tensor data = {{0, 180, 206}}; @@ -3956,11 +3960,11 @@ inline array_type::tensor Turquoise(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Violet(size_t N = 1) { array_type::tensor data = {{88, 66, 155}}; @@ -3968,11 +3972,11 @@ inline array_type::tensor Violet(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor VioletRed(size_t N = 1) { array_type::tensor data = {{239, 88, 160}}; @@ -3980,11 +3984,11 @@ inline array_type::tensor VioletRed(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor WildStrawberry(size_t N = 1) { array_type::tensor data = {{238, 41, 103}}; @@ -3992,11 +3996,11 @@ inline array_type::tensor WildStrawberry(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Yellow(size_t N = 1) { array_type::tensor data = {{255, 242, 0}}; @@ -4004,11 +4008,11 @@ inline array_type::tensor Yellow(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor YellowGreen(size_t N = 1) { array_type::tensor data = {{152, 204, 112}}; @@ -4016,11 +4020,11 @@ inline array_type::tensor YellowGreen(size_t N = 1) } /** -dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors - -\param N Number of colors to output. -\returns RGB data. -*/ + * dvips color. See: https://en.wikibooks.org/wiki/LaTeX/Colors + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor YellowOrange(size_t N = 1) { array_type::tensor data = {{250, 162, 26}}; @@ -4028,584 +4032,584 @@ inline array_type::tensor YellowOrange(size_t N = 1) } /** -Inverse of cppcolormap::Accent. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Accent. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Accent_r(size_t N = 8) { return xt::flip(Accent(N), 0); } /** -Inverse of cppcolormap::Dark2. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Dark2. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Dark2_r(size_t N = 8) { return xt::flip(Dark2(N), 0); } /** -Inverse of cppcolormap::Paired. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Paired. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Paired_r(size_t N = 12) { return xt::flip(Paired(N), 0); } /** -Inverse of cppcolormap::Spectral. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Spectral. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Spectral_r(size_t N = 11) { return xt::flip(Spectral(N), 0); } /** -Inverse of cppcolormap::Pastel1. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Pastel1. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Pastel1_r(size_t N = 9) { return xt::flip(Pastel1(N), 0); } /** -Inverse of cppcolormap::Pastel2. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Pastel2. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Pastel2_r(size_t N = 8) { return xt::flip(Pastel2(N), 0); } /** -Inverse of cppcolormap::Set1. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Set1. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Set1_r(size_t N = 9) { return xt::flip(Set1(N), 0); } /** -Inverse of cppcolormap::Set2. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Set2. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Set2_r(size_t N = 8) { return xt::flip(Set2(N), 0); } /** -Inverse of cppcolormap::Set3. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Set3. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Set3_r(size_t N = 12) { return xt::flip(Set3(N), 0); } /** -Inverse of cppcolormap::Blues. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Blues. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Blues_r(size_t N = 9) { return xt::flip(Blues(N), 0); } /** -Inverse of cppcolormap::Greens. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Greens. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Greens_r(size_t N = 9) { return xt::flip(Greens(N), 0); } /** -Inverse of cppcolormap::Greys. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Greys. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Greys_r(size_t N = 2) { return xt::flip(Greys(N), 0); } /** -Inverse of cppcolormap::Oranges. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Oranges. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Oranges_r(size_t N = 9) { return xt::flip(Oranges(N), 0); } /** -Inverse of cppcolormap::Purples. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Purples. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Purples_r(size_t N = 9) { return xt::flip(Purples(N), 0); } /** -Inverse of cppcolormap::Reds. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::Reds. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor Reds_r(size_t N = 9) { return xt::flip(Reds(N), 0); } /** -Inverse of cppcolormap::BuPu. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::BuPu. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor BuPu_r(size_t N = 9) { return xt::flip(BuPu(N), 0); } /** -Inverse of cppcolormap::GnBu. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::GnBu. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor GnBu_r(size_t N = 9) { return xt::flip(GnBu(N), 0); } /** -Inverse of cppcolormap::PuBu. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::PuBu. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PuBu_r(size_t N = 9) { return xt::flip(PuBu(N), 0); } /** -Inverse of cppcolormap::PuBuGn. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::PuBuGn. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PuBuGn_r(size_t N = 9) { return xt::flip(PuBuGn(N), 0); } /** -Inverse of cppcolormap::PuRd. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::PuRd. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PuRd_r(size_t N = 9) { return xt::flip(PuRd(N), 0); } /** -Inverse of cppcolormap::RdPu. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::RdPu. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RdPu_r(size_t N = 9) { return xt::flip(RdPu(N), 0); } /** -Inverse of cppcolormap::OrRd. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::OrRd. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor OrRd_r(size_t N = 9) { return xt::flip(OrRd(N), 0); } /** -Inverse of cppcolormap::RdOrYl. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::RdOrYl. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RdOrYl_r(size_t N = 9) { return xt::flip(RdOrYl(N), 0); } /** -Inverse of cppcolormap::YlGn. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::YlGn. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor YlGn_r(size_t N = 9) { return xt::flip(YlGn(N), 0); } /** -Inverse of cppcolormap::YlGnBu. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::YlGnBu. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor YlGnBu_r(size_t N = 9) { return xt::flip(YlGnBu(N), 0); } /** -Inverse of cppcolormap::YlOrRd. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::YlOrRd. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor YlOrRd_r(size_t N = 9) { return xt::flip(YlOrRd(N), 0); } /** -Inverse of cppcolormap::BrBG. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::BrBG. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor BrBG_r(size_t N = 11) { return xt::flip(BrBG(N), 0); } /** -Inverse of cppcolormap::PuOr. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::PuOr. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PuOr_r(size_t N = 11) { return xt::flip(PuOr(N), 0); } /** -Inverse of cppcolormap::RdBu. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::RdBu. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RdBu_r(size_t N = 11) { return xt::flip(RdBu(N), 0); } /** -Inverse of cppcolormap::RdGy. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::RdGy. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RdGy_r(size_t N = 11) { return xt::flip(RdGy(N), 0); } /** -Inverse of cppcolormap::RdYlBu. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::RdYlBu. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RdYlBu_r(size_t N = 11) { return xt::flip(RdYlBu(N), 0); } /** -Inverse of cppcolormap::RdYlGn. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::RdYlGn. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor RdYlGn_r(size_t N = 11) { return xt::flip(RdYlGn(N), 0); } /** -Inverse of cppcolormap::PiYG. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::PiYG. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PiYG_r(size_t N = 11) { return xt::flip(PiYG(N), 0); } /** -Inverse of cppcolormap::PRGn. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::PRGn. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor PRGn_r(size_t N = 11) { return xt::flip(PRGn(N), 0); } /** -Inverse of cppcolormap::spring. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::spring. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor spring_r(size_t N = 256) { return xt::flip(spring(N), 0); } /** -Inverse of cppcolormap::summer. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::summer. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor summer_r(size_t N = 256) { return xt::flip(summer(N), 0); } /** -Inverse of cppcolormap::autumn. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::autumn. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor autumn_r(size_t N = 256) { return xt::flip(autumn(N), 0); } /** -Inverse of cppcolormap::winter. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::winter. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor winter_r(size_t N = 256) { return xt::flip(winter(N), 0); } /** -Inverse of cppcolormap::bone. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::bone. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor bone_r(size_t N = 256) { return xt::flip(bone(N), 0); } /** -Inverse of cppcolormap::cool. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::cool. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor cool_r(size_t N = 256) { return xt::flip(cool(N), 0); } /** -Inverse of cppcolormap::hot. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::hot. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor hot_r(size_t N = 256) { return xt::flip(hot(N), 0); } /** -Inverse of cppcolormap::copper. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::copper. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor copper_r(size_t N = 256) { return xt::flip(copper(N), 0); } /** -Inverse of cppcolormap::hsv. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::hsv. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor hsv_r(size_t N = 256) { return xt::flip(hsv(N), 0); } /** -Inverse of cppcolormap::nipy_spectral. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::nipy_spectral. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor nipy_spectral_r(size_t N = 256) { return xt::flip(nipy_spectral(N), 0); } /** -Inverse of cppcolormap::jet. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::jet. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor jet_r(size_t N = 256) { return xt::flip(jet(N), 0); } /** -Inverse of cppcolormap::terrain. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::terrain. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor terrain_r(size_t N = 5) { return xt::flip(terrain(N), 0); } /** -Inverse of cppcolormap::seismic. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::seismic. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor seismic_r(size_t N = 6) { return xt::flip(seismic(N), 0); } /** -Inverse of cppcolormap::afmhot. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::afmhot. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor afmhot_r(size_t N = 256) { return xt::flip(afmhot(N), 0); } /** -Inverse of cppcolormap::magma. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::magma. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor magma_r(size_t N = 256) { return xt::flip(magma(N), 0); } /** -Inverse of cppcolormap::inferno. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::inferno. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor inferno_r(size_t N = 256) { return xt::flip(inferno(N), 0); } /** -Inverse of cppcolormap::plasma. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::plasma. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor plasma_r(size_t N = 256) { return xt::flip(plasma(N), 0); } /** -Inverse of cppcolormap::viridis. - -\param N Number of colors to output. -\returns RGB data. -*/ + * Inverse of cppcolormap::viridis. + * + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor viridis_r(size_t N = 256) { return xt::flip(viridis(N), 0); } /** -Get colormap specified as string. - -\param cmap Name of the colormap. -\param N Number of colors to output. -\returns RGB data. -*/ + * Get colormap specified as string. + * + * @param cmap Name of the colormap. + * @param N Number of colors to output. + * @returns RGB data. + */ inline array_type::tensor colormap(const std::string& cmap, size_t N = 256) { if (cmap == "Accent") { @@ -5144,10 +5148,10 @@ inline array_type::tensor colormap(const std::string& cmap, size_t N } /** -xterm color-cyle. - -\returns RGB data. -*/ + * xterm color-cyle. + * + * @returns RGB data. + */ inline array_type::tensor xterm() { array_type::tensor data = { @@ -5413,10 +5417,10 @@ inline array_type::tensor xterm() } /** -Eindhoven University of Technology color-cyle. - -\returns RGB data. -*/ + * Eindhoven University of Technology color-cyle. + * + * @returns RGB data. + */ inline array_type::tensor tue() { array_type::tensor data = { @@ -5439,31 +5443,31 @@ inline array_type::tensor tue() } /** -Inverse of cppcolormap::xterm. - -\returns RGB data. -*/ + * Inverse of cppcolormap::xterm. + * + * @returns RGB data. + */ inline array_type::tensor xterm_r() { return xt::flip(xterm(), 0); } /** -Inverse of cppcolormap::tue. - -\returns RGB data. -*/ + * Inverse of cppcolormap::tue. + * + * @returns RGB data. + */ inline array_type::tensor tue_r() { return xt::flip(tue(), 0); } /** -Get color-cycle specified as string. - -\param cmap Name of the colormap. -\returns RGB data. -*/ + * Get color-cycle specified as string. + * + * @param cmap Name of the colormap. + * @returns RGB data. + */ inline array_type::tensor colorcycle(const std::string& cmap) { if (cmap == "xterm") { @@ -5486,8 +5490,8 @@ inline array_type::tensor colorcycle(const std::string& cmap) } /** -Algorithm to use for color matching. -*/ + * Algorithm to use for color matching. + */ enum metric { euclidean, ///< Euclidean norm fast_perceptual, ///< Fast best perception algorithm. See: @@ -5523,17 +5527,18 @@ double perceptual_metric(double R1, double G1, double B1, double R2, double G2, } // namespace detail /** -Match colors. - -\param A List of colors. -\param B List of colors. -\param distance_metric Metric to use in color matching. -\return For each item in ``A``, the index of the closets corresponding color in ``B``. -*/ + * Match colors. + * + * @param A List of colors. + * @param B List of colors. + * @param distance_metric Metric to use in color matching. + * @return For each item in ``A``, the index of the closets corresponding color in ``B``. + */ inline array_type::tensor match( const array_type::tensor& A, const array_type::tensor& B, - metric distance_metric = euclidean) + metric distance_metric = euclidean +) { array_type::tensor idx = xt::empty({A.shape(0)}); array_type::tensor d = xt::empty({B.shape(0)}); diff --git a/python/main.cpp b/python/main.cpp index e02c5d3..9d4e560 100644 --- a/python/main.cpp +++ b/python/main.cpp @@ -23,10 +23,10 @@ namespace py = pybind11; .c_str() /** -Overrides the `__name__` of a module. -Classes defined by pybind11 use the `__name__` of the module as of the time they are defined, -which affects the `__repr__` of the class type objects. -*/ + * Overrides the `__name__` of a module. + * Classes defined by pybind11 use the `__name__` of the module as of the time they are defined, + * which affects the `__repr__` of the class type objects. + */ class ScopedModuleNameOverride { public: explicit ScopedModuleNameOverride(py::module m, std::string name) : module_(std::move(m)) @@ -59,18 +59,22 @@ PYBIND11_MODULE(_cppcolormap, m) m.def( "rgb2hex", static_cast&)>(&cppcolormap::rgb2hex), - DOC("rgb2hex")); + DOC("rgb2hex") + ); m.def( "rgb2hex", static_cast (*)(const xt::pytensor&)>( - &cppcolormap::rgb2hex), - DOC("rgb2hex")); + &cppcolormap::rgb2hex + ), + DOC("rgb2hex") + ); m.def( "hex2rgb", py::overload_cast&>(&cppcolormap::hex2rgb), - DOC("hex2rgb")); + DOC("hex2rgb") + ); m.def("hex2rgb", py::overload_cast(&cppcolormap::hex2rgb), DOC("hex2rgb")); @@ -79,7 +83,8 @@ PYBIND11_MODULE(_cppcolormap, m) &cppcolormap::interp, xt::pytensor>, DOC("interp"), py::arg("arg"), - py::arg("N")); + py::arg("N") + ); m.def( "as_colors", @@ -91,7 +96,8 @@ PYBIND11_MODULE(_cppcolormap, m) py::arg("data"), py::arg("colors"), py::arg("vmin"), - py::arg("vmax")); + py::arg("vmax") + ); m.def( "as_colors", @@ -100,7 +106,8 @@ PYBIND11_MODULE(_cppcolormap, m) }, DOC("as_colors"), py::arg("data"), - py::arg("colors")); + py::arg("colors") + ); m.def("Accent", &cppcolormap::Accent, DOC("Accent"), py::arg("N") = 8); m.def("Dark2", &cppcolormap::Dark2, DOC("Dark2"), py::arg("N") = 8); @@ -201,10 +208,8 @@ PYBIND11_MODULE(_cppcolormap, m) m.def("copper_r", &cppcolormap::copper_r, DOC("copper_r"), py::arg("N") = 256); m.def("hsv_r", &cppcolormap::hsv_r, DOC("hsv_r"), py::arg("N") = 256); m.def( - "nipy_spectral_r", - &cppcolormap::nipy_spectral_r, - DOC("nipy_spectral_r"), - py::arg("N") = 256); + "nipy_spectral_r", &cppcolormap::nipy_spectral_r, DOC("nipy_spectral_r"), py::arg("N") = 256 + ); m.def("terrain_r", &cppcolormap::terrain_r, DOC("terrain_r"), py::arg("N") = 6); m.def("seismic_r", &cppcolormap::seismic_r, DOC("seismic_r"), py::arg("N") = 5); m.def("afmhot_r", &cppcolormap::afmhot_r, DOC("afmhot_r"), py::arg("N") = 256);