예제 #1
0
파일: Component.py 프로젝트: Alex-Song/vmaf
    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])
예제 #3
0
 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
파일: Inventory.py 프로젝트: Alex-Song/vmaf
    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
파일: Cone.py 프로젝트: bmi-forum/bmi-pyre
    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
파일: Angle.py 프로젝트: bmi-forum/bmi-pyre
 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
파일: Weaver.py 프로젝트: zliu72/Combustion
    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
파일: Vector.py 프로젝트: zliu72/Combustion
 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
파일: Torus.py 프로젝트: zliu72/Combustion
 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
파일: Block.py 프로젝트: zliu72/Combustion
 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
파일: Block.py 프로젝트: bmi-forum/bmi-pyre
 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