You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "rawkintrevo (via GitHub)" <gi...@apache.org> on 2023/02/14 21:37:48 UTC
[GitHub] [mahout] rawkintrevo opened a new pull request, #424: MAHOUT-2155 Add Javadocs for RandomWrapper
rawkintrevo opened a new pull request, #424:
URL: https://github.com/apache/mahout/pull/424
### Purpose of PR:
Add javadocs for RandomWrapper
### Important ToDos
Please mark each with an "x"
- [x] A JIRA ticket exists (if not, please create this first)[https://issues.apache.org/jira/browse/mahout/]
- [x] Title of PR is "MAHOUT-XXXX Brief Description of Changes" where XXXX is the JIRA number.
- [x] Assigned JIRA to self
- [x] Added documentation in scala docs/java docs, and to website
Does this change break earlier versions? No
Is this the beginning of a larger project for which a feature branch should be made? No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mahout.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [mahout] rawkintrevo merged pull request #424: MAHOUT-2155 Add Javadocs for RandomWrapper
Posted by "rawkintrevo (via GitHub)" <gi...@apache.org>.
rawkintrevo merged PR #424:
URL: https://github.com/apache/mahout/pull/424
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mahout.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [mahout] rawkintrevo commented on a diff in pull request #424: MAHOUT-2155 Add Javadocs for RandomWrapper
Posted by "rawkintrevo (via GitHub)" <gi...@apache.org>.
rawkintrevo commented on code in PR #424:
URL: https://github.com/apache/mahout/pull/424#discussion_r1106466795
##########
core/src/main/java/org/apache/mahout/common/RandomWrapper.java:
##########
@@ -47,14 +65,21 @@ public void setSeed(long seed) {
}
}
+ /**
+ * Sets the seed to a standard value that can be used to ensure that tests are deterministic.
+ */
void resetToTestSeed() {
setSeed(STANDARD_SEED);
}
+ /**
+ * @return the delegate random number generator.
+ */
public RandomGenerator getRandomGenerator() {
return random;
}
+
@Override
protected int next(int bits) {
Review Comment:
Addressed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mahout.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [mahout] andrewmusselman commented on a diff in pull request #424: MAHOUT-2155 Add Javadocs for RandomWrapper
Posted by "andrewmusselman (via GitHub)" <gi...@apache.org>.
andrewmusselman commented on code in PR #424:
URL: https://github.com/apache/mahout/pull/424#discussion_r1106454856
##########
core/src/main/java/org/apache/mahout/common/RandomWrapper.java:
##########
@@ -47,14 +65,21 @@ public void setSeed(long seed) {
}
}
+ /**
+ * Sets the seed to a standard value that can be used to ensure that tests are deterministic.
+ */
void resetToTestSeed() {
setSeed(STANDARD_SEED);
}
+ /**
+ * @return the delegate random number generator.
+ */
public RandomGenerator getRandomGenerator() {
return random;
}
+
Review Comment:
Do we need this extra newline?
##########
core/src/main/java/org/apache/mahout/common/RandomWrapper.java:
##########
@@ -47,14 +65,21 @@ public void setSeed(long seed) {
}
}
+ /**
+ * Sets the seed to a standard value that can be used to ensure that tests are deterministic.
+ */
void resetToTestSeed() {
setSeed(STANDARD_SEED);
}
+ /**
+ * @return the delegate random number generator.
+ */
public RandomGenerator getRandomGenerator() {
return random;
}
+
@Override
protected int next(int bits) {
Review Comment:
While we're at it can we add a comment block to this method?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mahout.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org