コード例 #1
0
ファイル: krawczyk.py プロジェクト: kashiwagi-lab/intervalpy
def fdFunc(no):
	""" define target function from fdFunc-module

	"""
	funcObj = func.fdFunc(no)
	x = funcObj.x
	y = funcObj.getFunc()
	return x, y
コード例 #2
0
ファイル: benchmark.py プロジェクト: kashiwagi-lab/intervalpy
def executeTime(no, I = None, loop = 1):
	""" execute calcurating time of all-solution

	"""
	if I == None:
		funcObj = func.fdFunc(no)
		I = funcObj.initI()
	time_str = time.time()
	for i in range(loop):
		solI = allsol.improveVerification(no, allsol.allSolution(no, I))
	time_end = time.time()
	printTime(I, solI, calcurateTime(time_str, time_end))
コード例 #3
0
ファイル: benchmark.py プロジェクト: kashiwagi-lab/intervalpy
def executeRUsage(no, I = None, loop = 1):
	""" execute calcurating all resource-usage of all-solution

	"""
	if I == None:
		funcObj = func.fdFunc(no)
		I = funcObj.initI()
	str = time.time()
	for i in range(loop):
		solI = allsol.improveVerification(no, allsol.allSolution(no, I))
	end = time.time()
	rUsage= rc.getrusage(rc.RUSAGE_SELF)
	pageSize = rc.getpagesize()
	printRUsage(no, I, solI, rUsage, pageSize)
	return (I, solI, (end-str), rUsage)