final public int adjust(int n) { int i; if (pathType == RELATIVE_PATH) { i = Math.min(intHash.determineHashWidth(n),11); // hash width 64 } else { i = intHash.determineHashWidth(n); } if (ih!=null && i<= ih.e) {} else ih = new intHash(i); Step temp = s; while(temp!=null){ temp.adjust(n); temp = temp.nextS; } return i; }
final public boolean isUnique(int i) { return ih.isUnique(i); }
public LocationPathExpr(){ state = START; s = null; pathType = RELATIVE_PATH; currentStep = null; //fib = new FastIntBuffer(8);// page size 256 = 2^ 8 ih = new intHash(); } final public void optimize2(){}
public static void main(String[] args) throws VTDException { intHash ih2 = new intHash(); for (int i1=0;i1<10;i1++){ if (ih2.isUnique(i1)==true) System.err.println(" !!!!!!!!!!!!!!! "); long startMem = rt.totalMemory() - rt.freeMemory(); intHash ih = new intHash(21); long endMem = rt.totalMemory() - rt.freeMemory(); if ( ih.isUnique(i)!= true) System.err.println("something wrong"+i);; System.out.println(" total size ==>"+ih.totalSize()); if ( ih._isUnique(i)!= false) System.err.println("something wrong"+i);;
public FunctionalLocationPathExpr(FuncExpr fne1){ state = START; s = null; pathType = FUNC_PATH; currentStep = null; fne = fne1; //fib = new FastIntBuffer(8);// page size 256 = 2^ 8 ih = new intHash(); } public String toString(){
final public boolean isUnique(int i) { return ih.isUnique(i); }
final public int adjust(int n) { int i; if (pathType == RELATIVE_PATH) { i = Math.min(intHash.determineHashWidth(n),6); // hash width 64 } else { i = intHash.determineHashWidth(n); } if (ih!=null && i<= ih.e) {} else ih = new intHash(i); Step temp = s; while(temp!=null){ temp.adjust(n); temp = temp.nextS; } return i; }
public FunctionalLocationPathExpr(FuncExpr fne1){ state = START; s = null; pathType = FUNC_PATH; currentStep = null; fne = fne1; //fib = new FastIntBuffer(8);// page size 256 = 2^ 8 ih = new intHash(); } public String toString(){
final public boolean isUnique(int i){ return ih.isUnique(i); }
final public int adjust(int n) { int i; if (pathType == RELATIVE_PATH) { i = Math.min(intHash.determineHashWidth(n),6); // hash width 64 } else { i = intHash.determineHashWidth(n); } if (ih!=null && i<= ih.e) {} else ih = new intHash(i); Step temp = s; while(temp!=null){ temp.adjust(n); temp = temp.nextS; } return i; }
public PathExpr(Expr f, LocationPathExpr l){ fe = f; lpe = l; //first_time = true; evalState = 0; //fib = new FastIntBuffer(8); ih = new intHash(); }
final public boolean isUnique(int i){ return ih.isUnique(i); }
flb = new FastLongBuffer(); fob = new FastObjectBuffer(); int i = intHash.determineHashWidth(md.vtdSize); insertHash = new intHash(i); deleteHash = new intHash(i);
public LocationPathExpr(){ state = START; s = null; pathType = RELATIVE_PATH; currentStep = null; //fib = new FastIntBuffer(8);// page size 256 = 2^ 8 ih = new intHash(); } final public void optimize2(){}
final public void reset(VTDNav vn){ state = START; Step temp = s; ih.reset(); currentStep = null; while(temp!=null){ temp.reset(vn); temp = temp.nextS; } /*cached = false; if (cachedNodeSet != null){ cachedNodeSet.clear(); }*/ }