org.databene.domain.math
Class PadovanLongGenerator

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<E>
      extended by org.databene.benerator.util.AbstractNonNullGenerator<E>
          extended by org.databene.benerator.primitive.number.AbstractNonNullNumberGenerator<E>
              extended by org.databene.benerator.primitive.number.RecurrenceRelationNumberGenerator<java.lang.Long>
                  extended by org.databene.domain.math.PadovanLongGenerator
All Implemented Interfaces:
java.io.Closeable, Generator<java.lang.Long>, NonNullGenerator<java.lang.Long>, org.databene.commons.Resettable, org.databene.commons.ThreadAware

public class PadovanLongGenerator
extends RecurrenceRelationNumberGenerator<java.lang.Long>

Generates numbers according to the Padovan Sequence. It is defined recursively by


Created at 03.07.2009 13:22:41

Since:
0.6.0
Author:
Volker Bergmann
See Also:
PadovanSequence

Field Summary
 
Fields inherited from class org.databene.benerator.primitive.number.AbstractNonNullNumberGenerator
generatedType, granularity, max, min
 
Fields inherited from class org.databene.benerator.util.AbstractGenerator
context, logger, state
 
Constructor Summary
PadovanLongGenerator(java.lang.Long min, java.lang.Long max, boolean unique)
           
 
Method Summary
protected  java.lang.Long a0(int n)
          Must be implemented by child classes to return the seed values of the recurrence relation.
protected  java.lang.Long aN()
          Must be implemented by child classes to implement the recurrence relation.
 void reset()
          See Resettable.reset()
protected  void resetMembers()
           
 
Methods inherited from class org.databene.benerator.primitive.number.RecurrenceRelationNumberGenerator
aN, calculateNext, close, generate, getDepth, getN, init
 
Methods inherited from class org.databene.benerator.primitive.number.AbstractNonNullNumberGenerator
getGeneratedType, getGranularity, getMax, getMin, isParallelizable, isThreadSafe, setGranularity, setMax, setMin
 
Methods inherited from class org.databene.benerator.util.AbstractNonNullGenerator
generate
 
Methods inherited from class org.databene.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, getResultWrapper, toString, wasInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.databene.benerator.Generator
wasInitialized
 

Constructor Detail

PadovanLongGenerator

public PadovanLongGenerator(java.lang.Long min,
                            java.lang.Long max,
                            boolean unique)
Method Detail

a0

protected java.lang.Long a0(int n)
Description copied from class: RecurrenceRelationNumberGenerator
Must be implemented by child classes to return the seed values of the recurrence relation. These are the initial values which are defined as constants (a(0)..a(depth-1)).

Specified by:
a0 in class RecurrenceRelationNumberGenerator<java.lang.Long>

aN

protected java.lang.Long aN()
Description copied from class: RecurrenceRelationNumberGenerator
Must be implemented by child classes to implement the recurrence relation. It needs to use the RecurrenceRelationNumberGenerator.aN(int) method to retrieve the most recent calculated values.

Specified by:
aN in class RecurrenceRelationNumberGenerator<java.lang.Long>

reset

public void reset()
Description copied from class: RecurrenceRelationNumberGenerator
See Resettable.reset()

Specified by:
reset in interface org.databene.commons.Resettable
Overrides:
reset in class RecurrenceRelationNumberGenerator<java.lang.Long>

resetMembers

protected void resetMembers()
Overrides:
resetMembers in class RecurrenceRelationNumberGenerator<java.lang.Long>


Copyright © 2013. All Rights Reserved.