-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Incorporate skip function in abstract classes (#53)
* Implement SkipFunctionFactory in AbstractRandomSampling constructor * Utilize skip function instead of abstract skipLength method * Remove init and skipLength methods * Make SkipFunction public
- Loading branch information
1 parent
b696686
commit 4903fac
Showing
9 changed files
with
48 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package gr.james.sampling; | ||
|
||
import java.util.Random; | ||
|
||
/** | ||
* A factory of {@link SkipFunction} instances. | ||
*/ | ||
@FunctionalInterface | ||
public interface SkipFunctionFactory { | ||
/** | ||
* Create a new {@link SkipFunction} instance. | ||
* | ||
* @param sampleSize the given sample size | ||
* @param random the given {@link Random} instance | ||
* @return the new {@link SkipFunction} instance | ||
*/ | ||
SkipFunction create(int sampleSize, Random random); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.