本文整理汇总了Python中Solver.Solver.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Solver.__init__方法的具体用法?Python Solver.__init__怎么用?Python Solver.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solver.Solver
的用法示例。
在下文中一共展示了Solver.__init__方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Solver import Solver [as 别名]
# 或者: from Solver.Solver import __init__ [as 别名]
def __init__(self, name="solvernonlinear"):
"""
Constructor.
"""
Solver.__init__(self, name)
ModuleSolverNonlinear.__init__(self)
return
示例2: __init__
# 需要导入模块: from Solver import Solver [as 别名]
# 或者: from Solver.Solver import __init__ [as 别名]
def __init__(self, iters=6000, test='temp', full=True, L=True, OD=True,
CP=True, LP=True, eq='CP', init=False, noise=0,
method='py_oracle'):
Solver.__init__(self, test=test, full=full, L=L, OD=OD, CP=CP, LP=LP,
eq=eq, init=init, noise=noise, method=method)
self.iters = iters
# CS test config
self.CS_PATH = '/Users/cathywu/Dropbox/Fa13/EE227BT/traffic-project'
self.OUT_PATH = '%s/' % c.DATA_DIR
# Test parameters
# self.method = 'cvx_random_sampling_L1_30_replace'
# self.method = method # 'cvx_random_sampling_L1_6000_replace'
# self.method = 'cvx_oracle'
# alg = 'cvx_unconstrained_L1'
# alg = 'cvx_L2'
# alg = 'cvx_raw'
# alg = 'cvx_weighted_L1'
# alg = 'cvx_hot_start_lp'
# alg = 'cvx_single_block_L_infty'
# alg = 'cvx_random_sample_L_infty'
# alg = 'cvx_mult_blocks_L_infty'
# alg = 'cvx_block_descent_L_infty'
# alg = 'cvx_entropy'
self.A, self.b, self.N, self.block_sizes, self.x_true, self.nz, \
self.flow, self.rsort_index, self.x0 = None, None, None, None, \
None, None, None, None, None
self.fname, self.mlab = None, None
示例3: __init__
# 需要导入模块: from Solver import Solver [as 别名]
# 或者: from Solver.Solver import __init__ [as 别名]
def __init__(self, name="solverlinear"):
"""
Constructor.
"""
Solver.__init__(self, name)
ModuleSolverLumped.__init__(self)
return
示例4: __init__
# 需要导入模块: from Solver import Solver [as 别名]
# 或者: from Solver.Solver import __init__ [as 别名]
def __init__(self, name, facility="solver"):
Solver.__init__(self, name, facility)
self.coupler = None
self.myPlus = []
self.remotePlus = []
return
示例5: __init__
# 需要导入模块: from Solver import Solver [as 别名]
# 或者: from Solver.Solver import __init__ [as 别名]
def __init__(self, test=None, full=True, L=True, OD=True, CP=True, LP=True,
eq='CP', damp=0, noise=0.0):
Solver.__init__(self)
self.test = test
self.eq = eq
self.full = full
self.L = L
self.OD = OD
self.CP = CP
self.LP = LP
self.damp = damp
self.data, self.A, self.b, self.x0, self.x_true = None, None, None, \
None, None
示例6: __init__
# 需要导入模块: from Solver import Solver [as 别名]
# 或者: from Solver.Solver import __init__ [as 别名]
def __init__(self, sparse=False, full=True, L=True, OD=True, CP=True,
LP=True, noise=0.0):
Solver.__init__(self, full=full, L=L, OD=OD, CP=CP, LP=LP, noise=noise)
self.sparse = sparse
示例7: __init__
# 需要导入模块: from Solver import Solver [as 别名]
# 或者: from Solver.Solver import __init__ [as 别名]
def __init__(self, name=None):
if name is None:
name = "simpleSolver"
Solver.__init__(self, name)
return
示例8: __init__
# 需要导入模块: from Solver import Solver [as 别名]
# 或者: from Solver.Solver import __init__ [as 别名]
def __init__(self, test=None, data=None, full=True, L=True, OD=True,
CP=True, LP=True, eq='CP', init=True, noise=0.0, method='BB'):
Solver.__init__(self, test=test, full=full, L=L, OD=OD, CP=CP, LP=LP,
eq=eq, init=init, noise=noise, method=method)