 |
NumCpp
1.0
A C++ implementation of the Python Numpy library
|
Go to the documentation of this file.
39 #include "boost/random/triangle_distribution.hpp"
59 template<
typename dtype>
60 dtype
triangle(dtype inA = 0, dtype inB = 0.5, dtype inC = 1)
79 const bool aLessB = inA <= inB;
80 const bool bLessC = inB <= inC;
81 if (!(aLessB && bLessC))
86 boost::random::triangle_distribution<dtype> dist(inA, inB, inC);
104 template<
typename dtype>
124 const bool aLessB = inA <= inB;
125 const bool bLessC = inB <= inC;
126 if (!(aLessB && bLessC))
133 boost::random::triangle_distribution<dtype> dist(inA, inB, inC);
136 [&dist](dtype& value) ->
void
138 value = dist(generator_);
dtype triangle(dtype inA=0, dtype inB=0.5, dtype inC=1)
Definition: triangle.hpp:60
void for_each(InputIt first, InputIt last, UnaryFunction f) noexcept
Definition: StlAlgorithms.hpp:214
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
#define STATIC_ASSERT_FLOAT(dtype)
Definition: StaticAsserts.hpp:44
iterator end() noexcept
Definition: NdArrayCore.hpp:1435
Definition: Coordinate.hpp:45
static std::mt19937_64 generator_
generator function
Definition: generator.hpp:40
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:37
iterator begin() noexcept
Definition: NdArrayCore.hpp:1091