Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
112ab6f9
Commit
112ab6f9
authored
Jan 21, 2017
by
Guolin Ke
Committed by
GitHub
Jan 21, 2017
Browse files
fix one bug in NextInt
parent
aeeef276
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
include/LightGBM/utils/random.h
include/LightGBM/utils/random.h
+1
-1
No files found.
include/LightGBM/utils/random.h
View file @
112ab6f9
...
...
@@ -35,7 +35,7 @@ public:
* \return The random integer between [lower_bound, upper_bound)
*/
inline
int
NextInt
(
int
lower_bound
,
int
upper_bound
)
{
return
(
next
())
%
(
upper_bound
-
lower_bound
+
1
)
+
lower_bound
;
return
(
next
())
%
(
upper_bound
-
lower_bound
)
+
lower_bound
;
}
/*!
* \brief Generate random float data
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment