# automatically generated by the FlatBuffers compiler, do not modify

# namespace: MNN

import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()

class RandomUniform(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAs(cls, buf, offset=0):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = RandomUniform()
        x.Init(buf, n + offset)
        return x

    @classmethod
    def GetRootAsRandomUniform(cls, buf, offset=0):
        """This method is deprecated. Please switch to GetRootAs."""
        return cls.GetRootAs(buf, offset)
    # RandomUniform
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # RandomUniform
    def Seed(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # RandomUniform
    def Seed2(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # RandomUniform
    def Type(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 1

    # RandomUniform
    def Low(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
        return 0.0

    # RandomUniform
    def High(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
        return 1.0

def RandomUniformStart(builder): builder.StartObject(5)
def Start(builder):
    return RandomUniformStart(builder)
def RandomUniformAddSeed(builder, seed): builder.PrependInt32Slot(0, seed, 0)
def AddSeed(builder, seed):
    return RandomUniformAddSeed(builder, seed)
def RandomUniformAddSeed2(builder, seed2): builder.PrependInt32Slot(1, seed2, 0)
def AddSeed2(builder, seed2):
    return RandomUniformAddSeed2(builder, seed2)
def RandomUniformAddType(builder, type): builder.PrependInt32Slot(2, type, 1)
def AddType(builder, type):
    return RandomUniformAddType(builder, type)
def RandomUniformAddLow(builder, low): builder.PrependFloat32Slot(3, low, 0.0)
def AddLow(builder, low):
    return RandomUniformAddLow(builder, low)
def RandomUniformAddHigh(builder, high): builder.PrependFloat32Slot(4, high, 1.0)
def AddHigh(builder, high):
    return RandomUniformAddHigh(builder, high)
def RandomUniformEnd(builder): return builder.EndObject()
def End(builder):
    return RandomUniformEnd(builder)