Trees | Indices | Help |
|
---|
|
1 ############################################################################### 2 # # 3 # Copyright (C) 2004-2014 Edward d'Auvergne # 4 # # 5 # This file is part of the program relax (http://www.nmr-relax.com). # 6 # # 7 # This program is free software: you can redistribute it and/or modify # 8 # it under the terms of the GNU General Public License as published by # 9 # the Free Software Foundation, either version 3 of the License, or # 10 # (at your option) any later version. # 11 # # 12 # This program is distributed in the hope that it will be useful, # 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of # 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 15 # GNU General Public License for more details. # 16 # # 17 # You should have received a copy of the GNU General Public License # 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. # 19 # # 20 ############################################################################### 21 22 # Module docstring. 23 """Auxiliary functions for optimisation.""" 24 25 26 # relax module imports. 27 from lib.errors import RelaxLenError 28 2931 """Test that the grid search options are reasonable. 32 33 @param lower: The lower bounds of the grid search which must be equal to the number of parameters in the model. 34 @type lower: array of numbers 35 @param upper: The upper bounds of the grid search which must be equal to the number of parameters in the model. 36 @type upper: array of numbers 37 @param inc: The increments for each dimension of the space for the grid search. The number of elements in the array must equal to the number of parameters in the model. 38 @type inc: array of int 39 @param n: The number of parameters in the model. 40 @type n: int 41 """ 42 43 # Lower bounds test. 44 if lower != None: 45 if len(lower) != n: 46 raise RelaxLenError('lower bounds', n) 47 48 # Upper bounds. 49 if upper != None: 50 if len(upper) != n: 51 raise RelaxLenError('upper bounds', n) 52 53 # Increment. 54 if isinstance(inc, list): 55 if len(inc) != n: 56 raise RelaxLenError('increment', n)57
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Jul 3 13:38:52 2014 | http://epydoc.sourceforge.net |