2
0
mirror of https://github.com/boostorg/math.git synced 2026-02-18 14:12:24 +00:00

Color Maps (#752)

* Color Maps

* Make color maps constexpr

[ci skip]

* Add newton fractal example

[ci skip]

* Remove some unused code.

* Make the color map base class generic in size

Fix naming convention
[ci skip]

* Begin documentation.

* Move helper functions from example into tools header

[ci skip]

* Update docs and remove non-ASCII characters from example

* Add image to docs

* Reduce size of virdis_newton_fractal from 1.31MB to 131KB

[ci skip]

* Add performance file

* Don't force linear complexity and fix CI failure for old clang versions

* Convert color_maps to free functions.

* Add missing header and remove constexpr test

* Convert tabs to spaces

[ci skip]

* Fix compile tests and make static constexpr uniform across data

* Add swatches to docs.

* Fix image links in docs

[ci skip]

Co-authored-by: Nick Thompson <nathompson7@protonmail.com>
This commit is contained in:
Matt Borland
2022-02-09 11:19:38 +01:00
committed by GitHub
parent 57cd5cae61
commit 3e950d9e3a
15 changed files with 2325 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
// (C) Copyright Matt Borland 2022.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/math/tools/color_maps.hpp>
#include "test_compile_result.hpp"
void compile_and_link_test()
{
check_result<float>(boost::math::tools::black_body<float>(0.5f)[0]);
check_result<float>(boost::math::tools::extended_kindlmann<float>(0.5f)[0]);
check_result<double>(boost::math::tools::inferno<double>(0.5)[0]);
check_result<double>(boost::math::tools::kindlmann<double>(0.5)[0]);
check_result<float>(boost::math::tools::plasma<float>(0.5f)[0]);
check_result<float>(boost::math::tools::smooth_cool_warm<float>(0.5f)[0]);
check_result<float>(boost::math::tools::viridis<float>(0.5f)[0]);
}