how make values of vector static all the program?

i want to generate vector randomProjection of unique random values and keep the vector with the same values as long running the program .

public class EuclideanHash implements HashFunction {

private static final long serialVersionUID = -3784656820380622717L;

private Vector randomProjection ;

private int offset;

private int w;

java.util.Vector v;

public EuclideanHash(int dimensions,int w){

Random rand = new Random();

this.w = w;

this.offset = 10;

randomProjection = new Vector(dimensions);

for(int d=0; d

double h= (double) ((double) Math.round(val*250)/10.0);



public int hash(Vector vector){

double hashValue =;

return (int) Math.round(hashValue);



Read More »

By: StackOverFlow - Monday, 16 April

Related Posts