[paleo]: adding the template for the inexact newton cg method