Changeset 739
- Timestamp:
- 09/07/10 08:47:17 (1 year ago)
- Files:
-
- PythonPackages/FuncDesigner/FuncDesigner/ooSystem.py (modified) (1 diff)
- PythonPackages/FuncDesigner/FuncDesigner/ooVar.py (modified) (1 diff)
- PythonPackages/OpenOpt/openopt/solvers/UkrOpt/ralg_oo.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
PythonPackages/FuncDesigner/FuncDesigner/ooSystem.py
r738 r739 188 188 # access by elements and their names 189 189 190 191 190 simplify = lambda val: asscalar(val) if isinstance(val, ndarray) and val.size == 1 else val 192 191 PythonPackages/FuncDesigner/FuncDesigner/ooVar.py
r734 r739 20 20 kwargs['name'] = name 21 21 oofun.__init__(self, lambda *ARGS: None, *args, **kwargs) 22 22 23 23 24 def _getFuncCalcEngine(self, x, **kwargs): 25 if hasattr(x, 'xf'):return x.xf[self] 24 26 r = x.get(self, None) 25 27 if r is not None: PythonPackages/OpenOpt/openopt/solvers/UkrOpt/ralg_oo.py
r737 r739 119 119 # B_f = diag(ones(n)) 120 120 # B_constr = diag(ones(n)) 121 hs = T(h0)121 hs = asarray(h0, T) 122 122 ls_arr = [] 123 w = T(1.0/alp-1.0)123 w = asarray(1.0/alp-1.0, T) 124 124 125 125 """ Shor r-alg engine """ 126 bestPoint = p.point(a tleast_1d(T(copy(x0))))126 bestPoint = p.point(asarray(copy(x0), T)) 127 127 prevIter_best_ls_point = bestPoint 128 128 prevIter_PointForDilation = bestPoint … … 622 622 vec1 = economyMult(b, g).reshape(-1,1)# TODO: remove economyMult, use dot? 623 623 #if alp_addition != 0: p.debugmsg('alp_addition:' + str(alp_addition)) 624 w = T(1.0/(alp+alp_addition)-1.0)624 w = asarray(1.0/(alp+alp_addition)-1.0, T) 625 625 vec2 = w * g.T 626 626 b += p.matmult(vec1, vec2)
