protected void estimateCardinality(StatementPatternNode sp,final AST2BOpContext ctx,final IBindingSet exogenousBindings,final int nrExogeneousBindings){
  final AtomicBoolean usesExogeneousBindings=new AtomicBoolean(false);
  final IV<?,?> s=getIV(sp.s(),exogenousBindings,usesExogeneousBindings);
  final IV<?,?> p=getIV(sp.p(),exogenousBindings,usesExogeneousBindings);
  final IV<?,?> o=getIV(sp.o(),exogenousBindings,usesExogeneousBindings);
  final IV<?,?> c=getIV(sp.c(),exogenousBindings,usesExogeneousBindings);
  final int exogenousBindingsAdjustmentFactor=usesExogeneousBindings.get() ? Math.max(1,nrExogeneousBindings) : 1;
  estimateCardinalities(sp,s,p,o,c,ctx,exogenousBindingsAdjustmentFactor);
}

protected void estimateCardinality ( StatementPatternNode sp , final AST2BOpContext ctx , final IBindingSet exogenousBindings , final int nrExogeneousBindings ) { final AtomicBoolean usesExogeneousBindings = new AtomicBoolean ( false ) ; final IV < ? , ? > s = getIV ( sp . s ( ) , exogenousBindings , usesExogeneousBindings ) ; final IV < ? , ? > p = getIV ( sp . p ( ) , exogenousBindings , usesExogeneousBindings ) ; final IV < ? , ? > o = getIV ( sp . o ( ) , exogenousBindings , usesExogeneousBindings ) ; final IV < ? , ? > c = getIV ( sp . c ( ) , exogenousBindings , usesExogeneousBindings ) ; final int exogenousBindingsAdjustmentFactor = usesExogeneousBindings . get ( ) ? Math . max ( 1 , nrExogeneousBindings ) : 1 ; estimateCardinalities ( sp , s , p , o , c , ctx , exogenousBindingsAdjustmentFactor ) ; }
for testing purposes we can override this method .
