 |
NumCpp
2.4.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Go to the documentation of this file.
39 #include "boost/random/triangle_distribution.hpp"
61 template<
typename dtype>
62 dtype
triangle(dtype inA = 0, dtype inB = 0.5, dtype inC = 1)
81 const bool aLessB = inA <= inB;
82 const bool bLessC = inB <= inC;
83 if (!(aLessB && bLessC))
88 boost::random::triangle_distribution<dtype> dist(inA, inB, inC);
107 template<
typename dtype>
127 const bool aLessB = inA <= inB;
128 const bool bLessC = inB <= inC;
129 if (!(aLessB && bLessC))
136 boost::random::triangle_distribution<dtype> dist(inA, inB, inC);
139 [&dist](dtype& value) ->
void
141 value = dist(generator_);
149 #endif // #ifndef NO_USE_BOOST
dtype triangle(dtype inA=0, dtype inB=0.5, dtype inC=1)
Definition: triangle.hpp:62
void for_each(InputIt first, InputIt last, UnaryFunction f)
Definition: StlAlgorithms.hpp:213
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:40
#define STATIC_ASSERT_FLOAT(dtype)
Definition: StaticAsserts.hpp:43
iterator end() noexcept
Definition: NdArrayCore.hpp:1431
Definition: Coordinate.hpp:44
static std::mt19937_64 generator_
generator function
Definition: generator.hpp:39
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:36
iterator begin() noexcept
Definition: NdArrayCore.hpp:1087