Package org.carrot2.math.matrix
Class RandomSeedingStrategyFactory
java.lang.Object
org.carrot2.math.matrix.RandomSeedingStrategyFactory
- All Implemented Interfaces:
SeedingStrategyFactory
public class RandomSeedingStrategyFactory extends Object implements SeedingStrategyFactory
Creates random seeding strategies.
-
Constructor Summary
Constructors Constructor Description RandomSeedingStrategyFactory()Creates the factory with seeding based on current system time.RandomSeedingStrategyFactory(int seed)Creates the factory with given seed value. -
Method Summary
Modifier and Type Method Description SeedingStrategycreateSeedingStrategy()Creates aSeedingStrategy.booleangetDateSeed()Returns true if the current system time is used to generate seed.intgetSeed()Returns the random seed to be used.voidsetDateSeed(boolean dateSeed)Set date seed to true to use current system time as random seed.voidsetSeed(int seed)Sets the random seed to be used.StringtoString()
-
Constructor Details
-
RandomSeedingStrategyFactory
public RandomSeedingStrategyFactory()Creates the factory with seeding based on current system time. -
RandomSeedingStrategyFactory
public RandomSeedingStrategyFactory(int seed)Creates the factory with given seed value.
-
-
Method Details
-
createSeedingStrategy
Description copied from interface:SeedingStrategyFactoryCreates aSeedingStrategy.- Specified by:
createSeedingStrategyin interfaceSeedingStrategyFactory
-
getSeed
public int getSeed()Returns the random seed to be used. -
setSeed
public void setSeed(int seed)Sets the random seed to be used. Disables seeding with current system time. -
getDateSeed
public boolean getDateSeed()Returns true if the current system time is used to generate seed. -
setDateSeed
public void setDateSeed(boolean dateSeed)Set date seed to true to use current system time as random seed. -
toString
-