Skip to content

Commit 3d95041

Browse files
fix windows
1 parent e4301ac commit 3d95041

2 files changed

Lines changed: 81 additions & 52 deletions

File tree

include/geode/stochastic/sampling/distributions.hpp

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,24 @@ namespace geode
4141
struct UniformClosed
4242
{
4343
UniformClosed() = default;
44-
bool is_valid() const;
44+
bool is_valid() const
45+
{
46+
if( min_value < max_value )
47+
{
48+
return true;
49+
}
50+
if( min_value == max_value )
51+
{
52+
geode::Logger::warn(
53+
"[Uniform Closed] - check range boundaries definintion [",
54+
min_value, ",", max_value, "]." );
55+
return true;
56+
}
57+
geode::Logger::error(
58+
"[Uniform Closed] - check range boundaries definintion [",
59+
min_value, ",", max_value, "]." );
60+
return false;
61+
}
4562

4663
Type min_value{ static_cast< Type >( 0 ) };
4764
Type max_value{ static_cast< Type >( 1 ) };
@@ -66,7 +83,17 @@ namespace geode
6683
struct UniformClosedOpen
6784
{
6885
UniformClosedOpen() = default;
69-
bool is_valid() const;
86+
bool is_valid() const
87+
{
88+
if( min_value < max_value )
89+
{
90+
return true;
91+
}
92+
geode::Logger::error(
93+
"[Uniform ClosedOpen] - check range boundaries definintion [",
94+
min_value, ",", max_value, "]." );
95+
return false;
96+
}
7097

7198
Type min_value{ static_cast< Type >( 0 ) };
7299
Type max_value{ static_cast< Type >( 1 ) };

src/geode/stochastic/sampling/distributions.cpp

Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -28,56 +28,58 @@
2828

2929
namespace geode
3030
{
31-
template < typename Type >
32-
bool UniformClosed< Type >::is_valid() const
33-
{
34-
if( min_value < max_value )
35-
{
36-
return true;
37-
}
38-
if( min_value == max_value )
39-
{
40-
geode::Logger::warn(
41-
"[Uniform Closed] - check range boundaries definintion [",
42-
min_value, ",", max_value, "]." );
43-
return true;
44-
}
45-
geode::Logger::error(
46-
"[Uniform Closed] - check range boundaries definintion [",
47-
min_value, ",", max_value, "]." );
48-
return false;
49-
}
50-
template opengeode_stochastic_stochastic_api struct UniformClosed<
51-
index_t >;
52-
template opengeode_stochastic_stochastic_api struct UniformClosed<
53-
local_index_t >;
54-
template opengeode_stochastic_stochastic_api struct UniformClosed<
55-
signed_index_t >;
56-
template opengeode_stochastic_stochastic_api struct UniformClosed< float >;
57-
template opengeode_stochastic_stochastic_api struct UniformClosed< double >;
58-
59-
template < typename Type >
60-
bool UniformClosedOpen< Type >::is_valid() const
61-
{
62-
if( min_value < max_value )
63-
{
64-
return true;
65-
}
66-
geode::Logger::error(
67-
"[Uniform ClosedOpen] - check range boundaries definintion [",
68-
min_value, ",", max_value, "]." );
69-
return false;
70-
}
71-
template opengeode_stochastic_stochastic_api struct UniformClosedOpen<
72-
index_t >;
73-
template opengeode_stochastic_stochastic_api struct UniformClosedOpen<
74-
local_index_t >;
75-
template opengeode_stochastic_stochastic_api struct UniformClosedOpen<
76-
signed_index_t >;
77-
template opengeode_stochastic_stochastic_api struct UniformClosedOpen<
78-
float >;
79-
template opengeode_stochastic_stochastic_api struct UniformClosedOpen<
80-
double >;
31+
// template < typename Type >
32+
// bool UniformClosed< Type >::is_valid() const
33+
// {
34+
// if( min_value < max_value )
35+
// {
36+
// return true;
37+
// }
38+
// if( min_value == max_value )
39+
// {
40+
// geode::Logger::warn(
41+
// "[Uniform Closed] - check range boundaries definintion [",
42+
// min_value, ",", max_value, "]." );
43+
// return true;
44+
// }
45+
// geode::Logger::error(
46+
// "[Uniform Closed] - check range boundaries definintion [",
47+
// min_value, ",", max_value, "]." );
48+
// return false;
49+
// }
50+
// template opengeode_stochastic_stochastic_api struct UniformClosed<
51+
// index_t >;
52+
// template opengeode_stochastic_stochastic_api struct UniformClosed<
53+
// local_index_t >;
54+
// template opengeode_stochastic_stochastic_api struct UniformClosed<
55+
// signed_index_t >;
56+
// template opengeode_stochastic_stochastic_api struct UniformClosed<
57+
// float >; template opengeode_stochastic_stochastic_api struct
58+
// UniformClosed< double >;
59+
//
60+
//
61+
// template < typename Type >
62+
// bool UniformClosedOpen< Type >::is_valid() const
63+
// {
64+
// if( min_value < max_value )
65+
// {
66+
// return true;
67+
// }
68+
// geode::Logger::error(
69+
// "[Uniform ClosedOpen] - check range boundaries definintion [",
70+
// min_value, ",", max_value, "]." );
71+
// return false;
72+
// }
73+
// template opengeode_stochastic_stochastic_api struct UniformClosedOpen<
74+
// index_t >;
75+
// template opengeode_stochastic_stochastic_api struct UniformClosedOpen<
76+
// local_index_t >;
77+
// template opengeode_stochastic_stochastic_api struct UniformClosedOpen<
78+
// signed_index_t >;
79+
// template opengeode_stochastic_stochastic_api struct UniformClosedOpen<
80+
// float >;
81+
// template opengeode_stochastic_stochastic_api struct UniformClosedOpen<
82+
// double >;
8183

8284
bool Gaussian::is_valid() const
8385
{

0 commit comments

Comments
 (0)