Rules to Directives

This commit is contained in:
rowanc1
2014-05-16 12:10:15 -07:00
parent 399678e496
commit 7b22d0aa7a
4 changed files with 19 additions and 19 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
import SimPEG
from SimPEG import Utils, sp, np
from Optimization import Remember, IterationPrinters, StoppingCriteria
import Rules
import Directives
class BaseInversion(object):
@@ -19,12 +19,12 @@ class BaseInversion(object):
@property
def ruleList(self):
if getattr(self,'_ruleList', None) is None:
self._ruleList = Rules.RuleList(inversion=self)
self._ruleList = Directives.DirectiveList(inversion=self)
return self._ruleList
@ruleList.setter
def ruleList(self, value):
assert isinstance(value, Rules.RuleList), 'Must be a RuleList'
assert isinstance(value, Directives.DirectiveList), 'Must be a RuleList'
self._ruleList = value
self._ruleList.inversion = self