Trait opencv::core::ConjGradSolver
source · pub trait ConjGradSolver: ConjGradSolverConst + MinProblemSolver {
fn as_raw_mut_ConjGradSolver(&mut self) -> *mut c_void;
}
Required Methods
fn as_raw_mut_ConjGradSolver(&mut self) -> *mut c_void
Implementations
sourceimpl dyn ConjGradSolver + '_
impl dyn ConjGradSolver + '_
sourcepub fn create(
f: &Ptr<dyn MinProblemSolver_Function>,
termcrit: TermCriteria
) -> Result<Ptr<dyn ConjGradSolver>>
pub fn create(
f: &Ptr<dyn MinProblemSolver_Function>,
termcrit: TermCriteria
) -> Result<Ptr<dyn ConjGradSolver>>
This function returns the reference to the ready-to-use ConjGradSolver object.
All the parameters are optional, so this procedure can be called even without parameters at all. In this case, the default values will be used. As default value for terminal criteria are the only sensible ones, MinProblemSolver::setFunction() should be called upon the obtained object, if the function was not given to create(). Otherwise, the two ways (submit it to create() or miss it out and call the MinProblemSolver::setFunction()) are absolutely equivalent (and will drop the same errors in the same way, should invalid input be detected).
Parameters
- f: Pointer to the function that will be minimized, similarly to the one you submit via MinProblemSolver::setFunction.
- termcrit: Terminal criteria to the algorithm, similarly to the one you submit via MinProblemSolver::setTermCriteria.
C++ default parameters
- f: PtrConjGradSolver::Function()
- termcrit: TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS,5000,0.000001)