コード例 #1
0
 def solveManifold(self,x,tol=None,maxIters=None):
     """Solves the manifold constraint starting from x, to the given
     tolerance and with the given maximum iteration count.  Default
     uses the values set as attributes of this class.
     """
     if tol==None: tol = self.tol
     if maxIters==None: maxIters = self.maxIters
     import rootfind
     rootfind.setXTolerance(1e-8)
     rootfind.setFTolerance(tol)
     rootfind.setVectorField(self.implicitConstraint)
     (res,x,val) = rootfind.findRootsBounded(x,self.bound)
     return x
コード例 #2
0
ファイル: robotcspace.py プロジェクト: joaomcm/Klampt
 def solveManifold(x):
     rootfind.setXTolerance(1e-8)
     rootfind.setFTolerance(self.ambientspace.tol)
     rootfind.setVectorField(subsetImplicitConstraint)
     (res,x,val) = rootfind.findRootsBounded(x,self.bound)
     return x