add testAdaptiveSRG and give a implementation of Optimizer