 |
NumCpp
2.3.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Go to the documentation of this file.
38 #include "boost/random/triangle_distribution.hpp"
58 template<
typename dtype>
59 dtype
triangle(dtype inA = 0, dtype inB = 0.5, dtype inC = 1)
78 const bool aLessB = inA <= inB;
79 const bool bLessC = inB <= inC;
80 if (!(aLessB && bLessC))
85 boost::random::triangle_distribution<dtype> dist(inA, inB, inC);
103 template<
typename dtype>
123 const bool aLessB = inA <= inB;
124 const bool bLessC = inB <= inC;
125 if (!(aLessB && bLessC))
132 boost::random::triangle_distribution<dtype> dist(inA, inB, inC);
135 [&dist](dtype& value) ->
void
137 value = dist(generator_);
dtype triangle(dtype inA=0, dtype inB=0.5, dtype inC=1)
Definition: triangle.hpp:59
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:1434
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:1090