org.carrot2.matrix.factorization.seeding
Class RandomSeedingStrategyFactory

java.lang.Object
  extended by org.carrot2.matrix.factorization.seeding.RandomSeedingStrategyFactory
All Implemented Interfaces:
ISeedingStrategyFactory

public class RandomSeedingStrategyFactory
extends Object
implements ISeedingStrategyFactory

Creates random seeding strategies.


Constructor Summary
RandomSeedingStrategyFactory()
          Creates the factory with seeding based on current system time.
RandomSeedingStrategyFactory(int seed)
          Creates the factory with given seed value.
 
Method Summary
 ISeedingStrategy createSeedingStrategy()
          Creates a ISeedingStrategy.
 boolean getDateSeed()
          Returns true if the current system time is used to generate seed.
 int getSeed()
          Returns the random seed to be used.
 void setDateSeed(boolean dateSeed)
          Set date seed to true to use current system time as random seed.
 void setSeed(int seed)
          Sets the random seed to be used.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

createSeedingStrategy

public ISeedingStrategy createSeedingStrategy()
Description copied from interface: ISeedingStrategyFactory
Creates a ISeedingStrategy.

Specified by:
createSeedingStrategy in interface ISeedingStrategyFactory

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.

Parameters:
seed -

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.

Parameters:
dateSeed -

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) Dawid Weiss, Stanislaw Osinski