NumCpp
1.0
A C++ implementation of the Python Numpy library
uniform.hpp
Go to the documentation of this file.
1
#pragma once
30
31
#include "
NumCpp/Core/DtypeInfo.hpp
"
32
#include "
NumCpp/Core/Internal/StaticAsserts.hpp
"
33
#include "
NumCpp/Random/randFloat.hpp
"
34
35
namespace
nc
36
{
37
namespace
random
38
{
39
//============================================================================
40
// Method Description:
53
template
<
typename
dtype>
54
dtype
uniform
(dtype inLow, dtype inHigh)
55
{
56
STATIC_ASSERT_FLOAT
(dtype);
57
58
return
randFloat
(inLow, inHigh);
59
}
60
61
//============================================================================
62
// Method Description:
76
template
<
typename
dtype>
77
NdArray<dtype>
uniform
(
const
Shape
& inShape, dtype inLow, dtype inHigh)
78
{
79
STATIC_ASSERT_FLOAT
(dtype);
80
81
return
randFloat
(inShape, inLow, inHigh);
82
}
83
}
84
}
StaticAsserts.hpp
nc::random::randFloat
dtype randFloat(dtype inLow, dtype inHigh=0.0)
Definition:
randFloat.hpp:62
nc::random::uniform
dtype uniform(dtype inLow, dtype inHigh)
Definition:
uniform.hpp:54
nc::NdArray< dtype >
nc::Shape
A Shape Class for NdArrays.
Definition:
Core/Shape.hpp:41
STATIC_ASSERT_FLOAT
#define STATIC_ASSERT_FLOAT(dtype)
Definition:
StaticAsserts.hpp:44
nc
Definition:
Coordinate.hpp:45
DtypeInfo.hpp
randFloat.hpp
include
NumCpp
Random
uniform.hpp
Generated by
1.8.17