@karlnapf is it okay to use std::vector internally? I could have used SGVector instead but the length of this vector may or may not be equal to (although not exceeding m_max_iteration_limit), and also we need two copies of this vector. Seemed easier this way.