both methods SoS_out and SoS_in define the same objects (e.g. f, [-1,1]^n, the target set...). Very often both methods are called one after the other. It would be better to separate the definition of the variables that are common to the 2 methods, into a new method (e.g. obj.SoS_var), so that we do not repeat all variable declarations at each call of SoS_in and SoS_out. This way we will save computational time.
both methods SoS_out and SoS_in define the same objects (e.g. f, [-1,1]^n, the target set...). Very often both methods are called one after the other. It would be better to separate the definition of the variables that are common to the 2 methods, into a new method (e.g. obj.SoS_var), so that we do not repeat all variable declarations at each call of SoS_in and SoS_out. This way we will save computational time.