public RFF_RBF(int featurSize,double sigma,int dim,Random rand,boolean inMemory){
  this(sigma,dim,inMemory);
  if (featurSize <= 0)   throw new IllegalArgumentException("The number of numeric features must be positive, not " + featurSize);
  if (sigma <= 0 || Double.isInfinite(sigma) || Double.isNaN(sigma))   throw new IllegalArgumentException("The sigma parameter must be positive, not " + sigma);
  if (dim <= 1)   throw new IllegalArgumentException("The target dimension must be positive, not " + dim);
  transform=new RandomMatrixRFF_RBF(Math.sqrt(0.5 / (sigma * sigma)),featurSize,dim,rand.nextLong());
  offsets=new RandomVectorRFF_RBF(dim,rand.nextLong());
  if (inMemory) {
    transform=transform.add(0.0);
    offsets=new DenseVector(offsets);
  }
}

public RFF_RBF ( int featurSize , double sigma , int dim , Random rand , boolean inMemory ) { this ( sigma , dim , inMemory ) ; if ( featurSize <= 0 ) throw new IllegalArgumentException ( "The number of numeric features must be positive, not " + featurSize ) ; if ( sigma <= 0 || Double . isInfinite ( sigma ) || Double . isNaN ( sigma ) ) throw new IllegalArgumentException ( "The sigma parameter must be positive, not " + sigma ) ; if ( dim <= 1 ) throw new IllegalArgumentException ( "The target dimension must be positive, not " + dim ) ; transform = new RandomMatrixRFF_RBF ( Math . sqrt ( 0.5 / ( sigma * sigma ) ) , featurSize , dim , rand . nextLong ( ) ) ; offsets = new RandomVectorRFF_RBF ( dim , rand . nextLong ( ) ) ; if ( inMemory ) { transform = transform . add ( 0.0 ) ; offsets = new DenseVector ( offsets ) ; } }
creates a new rff rbf object
