示例#1
0
    def __init__(self, document, attributes):
        AbstractNode.__init__(self, document)
        name = attributes["name"]

        from pyre.inventory.odb.Registry import Registry
        self.component = Registry(name)
        return
示例#2
0
文件: Node.py 项目: pombreda/comp304
 def __init__(self, semanticObject):
   """ NOTE: AToM3 dependent method """
   AbstractNode.__init__(self, semanticObject)
   
   box = self._obj.getbbox()
   self._pos = (box[0], box[1])
   self._size = (box[2] - box[0], box[3] - box[1])
 def __init__(self, document, attributes):
     base.__init__(self, document)
     
     # mcweights
     mcweights = attributes.get( 'mcweights' )
     if mcweights:
         mcweights = self._parse( mcweights )
     else:
         mcweights = 0, 1, 0
     self._mcweights = mcweights
     
     # max_multiplescattering_loops
     mml = attributes.get('max_multiplescattering_loops')
     if mml: mml = int(mml)
     self._max_multiplescattering_loops = mml
     
     # min_neutron_probability
     mnp = attributes.get('min_neutron_probability')
     if mnp: mnp = float(mnp)
     self._min_neutron_probability = mnp
     
     # packing_factor
     pf = attributes.get('packing_factor')
     if pf: pf = float(pf)
     self._packing_factor = pf
     return
示例#4
0
    def __init__(self, document, attributes):
        AbstractNode.__init__(self, document)

        from pyre.inventory.odb.Inventory import Inventory
        self.inventory = Inventory('root')

        return
示例#5
0
    def __init__(self, document, attributes):
        AbstractNode.__init__(self, attributes)

        self._major = self._parse(attributes["major"])
        self._minor = self._parse(attributes["minor"])
        self._scale = self._parse(attributes["scale"])
        self._height = self._parse(attributes["height"])

        return
示例#6
0
    def __init__(self, document, attributes):
        AbstractNode.__init__(self, attributes)

        self._topRadius = self._parse(attributes["topRadius"])
        self._bottomRadius = self._parse(attributes["bottomRadius"])

        self._height = self._parse(attributes["height"])

        return
示例#7
0
    def __init__(self, document, attributes):
        AbstractNode.__init__(self, attributes)

        self._major = self._parse(attributes["major"])
        self._minor = self._parse(attributes["minor"])
        self._scale = self._parse(attributes["scale"])
        self._height = self._parse(attributes["height"])

        return
示例#8
0
    def __init__(self, root, attributes):
        AbstractNode.__init__(self, root, attributes)

        symbol = attributes["id"]
        atomicWeight = attributes.get("atomicWeight")
        locator = self.documentNode().locator()

        self._element = self.documentNode().mechanism().newElement(
            symbol, atomicWeight, locator)
        return
示例#9
0
    def __init__(self, root, attributes):
        AbstractNode.__init__(self, root, attributes)

        symbol = attributes["id"]
        phase = attributes.get("phase")
        locator = self.documentNode().locator()

        species = self.documentNode().mechanism().newSpecies(symbol, locator)
        species.phase = phase
        self._species = species
        return
示例#10
0
    def __init__(self, document, attributes):
        AbstractNode.__init__(self, document )
        
        # convert to dictionary
        attrs = {}
        for k,v in attributes.items(): attrs[str(k)] = v

        # new element
        self.element = self.elementFactory(**attrs)

        return
示例#11
0
    def __init__(self, document, attributes):
        AbstractNode.__init__(self, document)

        # convert to dictionary
        attrs = {}
        for k, v in attributes.items():
            attrs[str(k)] = v

        # new element
        self.element = self.elementFactory(**attrs)

        return
示例#12
0
    def __init__(self, root, attributes):
        AbstractNode.__init__(self, root, attributes)

        a = float(attributes["a"])
        Ts = float(attributes["Ts"])
        T3s = float(attributes["T3s"])

        T2s = attributes.get("T2s")

        if T2s:
            self._parameters = (a, T3s, Ts, float(T2s))
        else:
            self._parameters = (a, T3s, Ts)

        return
示例#13
0
    def __init__(self, root, attributes):
        AbstractNode.__init__(self, root, attributes)

        self.efficiencies = []

        self.arrhenius = None
        self.rev = None
        self.lt = None
        self.rlt = None

        self.low = None
        self.sri = None
        self.troe = None

        return
示例#14
0
    def __init__(self, root, attributes):
        AbstractNode.__init__(self, root, attributes)

        a = float(attributes["a"])
        b = float(attributes["b"])
        c = float(attributes["c"])
        d = attributes.get("d")
        e = attributes.get("e")

        if d and e:
            self._parameters = (a, b, c, float(d), float(e))
        else:
            self._parameters = (a, b, c)

        return
示例#15
0
 def __init__(self, semanticObject, hyperEdge):
   """ NOTE: AToM3 dependent method """
   AbstractNode.__init__(self, semanticObject)
   
   # Position and size of the edge's center drawing    
   centerObj = self._obj.getCenterObject()
   if(centerObj):
     box = centerObj.getbbox()
     self._pos = (box[0], box[1])
     self._size = (box[2] - box[0], box[3] - box[1])
   else:
     self._pos = (self._obj.x, self._obj.y)
     self._size = (0, 0)
     
   # The hyperEdge object associated with this centerpoint node
   self.__hyperEdge = hyperEdge
示例#16
0
文件: Pyramid.py 项目: Alex-Song/vmaf
 def __init__(self, document, attributes):
     AbstractNode.__init__(self, attributes)
     return
示例#17
0
 def __init__(self, document, attributes):
     AbstractNode.__init__(self, document)
     self.name = attributes["name"]
     self.value = ''
     self.locator = None
     return
示例#18
0
文件: Torus.py 项目: Alex-Song/vmaf
 def __init__(self, document, attributes):
     AbstractNode.__init__(self, attributes)
     self._major = self._parse(attributes["major"])
     self._minor = self._parse(attributes["minor"])
     return
示例#19
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._efficiencies = []
     return
示例#20
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._value = 0.0
     return
示例#21
0
 def __init__(self, document, attributes):
     AbstractNode.__init__(self, attributes)
     self._angle = ''
     return
示例#22
0
    def __init__(self, root, attributes):
        AbstractNode.__init__(self, root, attributes)

        self._mechanism = root.mechanism()
        return
示例#23
0
文件: Mill.py 项目: zliu72/Combustion
    def __init__(self, root, attributes):
        AbstractNode.__init__(self, root, attributes)
        name = attributes["class"]
        self._options = Registry(name)

        return
示例#24
0
 def __init__(self, document, attributes):
     AbstractNode.__init__(self, attributes)
     self._radius = self._parse(attributes["radius"])
     self._height = self._parse(attributes["height"])
     return
示例#25
0
    def __init__(self, root, attributes):
        AbstractNode.__init__(self, root, attributes)

        self._options = Registry("root")

        return
示例#26
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self.name = attributes["name"]
     self.value = attributes.get("value")
     return
示例#27
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._bannerCharacter = None
     return
示例#28
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._vector = None
     return
示例#29
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._thermo = []
     return
示例#30
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._reactants = []
     self._products = []
     return
示例#31
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._composition = []
     return
示例#32
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._major = self._parse(attributes["major"])
     self._minor = self._parse(attributes["minor"])
     return
示例#33
0
 def __init__(self, document, attributes):
     AbstractNode.__init__(self, attributes)
     self._radius = self._parse(attributes["radius"])
     return
示例#34
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._element = attributes["element"]
     self._coefficient = int(attributes.get("coefficient", "1"))
     return
示例#35
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._radius = self._parse(attributes["radius"])
     return
示例#36
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._copyright = ""
     return
示例#37
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._diagonal = self._parse(attributes["diagonal"])
     return
示例#38
0
 def __init__(self, document, attributes):
     AbstractNode.__init__(self, document)
     self.name = attributes["name"]
     self.value = ''
     self.locator = None
     return
示例#39
0
 def __init__(self, document, attributes):
     AbstractNode.__init__(self, attributes)
     self._angle = ''
     return
示例#40
0
 def __init__(self, document, attributes):
     AbstractNode.__init__(self, attributes)
     self._diagonal = self._parse(attributes["diagonal"])
     return
示例#41
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._organization = ""
     return
示例#42
0
 def __init__(self, document, attributes):
     AbstractNode.__init__(self, attributes)
     return
示例#43
0
 def __init__(self, root, attributes):
     AbstractNode.__init__(self, root, attributes)
     self._author = ""
     return