# automatically generated by the FlatBuffers compiler, do not modify

# namespace: MNN

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

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

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

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

    # LutSuperAcmeQuantizedParam
    def LutFlag(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
        return False

    # LutSuperAcmeQuantizedParam
    def LutTbl(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(flatbuffers.number_types.Int8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1))
        return 0

    # LutSuperAcmeQuantizedParam
    def LutTblAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int8Flags, o)
        return 0

    # LutSuperAcmeQuantizedParam
    def LutTblLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # LutSuperAcmeQuantizedParam
    def LutTblIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        return o == 0

    # LutSuperAcmeQuantizedParam
    def InputZero(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 0

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

    # LutSuperAcmeQuantizedParam
    def InputScale(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 0.0

    # LutSuperAcmeQuantizedParam
    def OutputScale(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos)
        return 0.0

def LutSuperAcmeQuantizedParamStart(builder): builder.StartObject(6)
def Start(builder):
    return LutSuperAcmeQuantizedParamStart(builder)
def LutSuperAcmeQuantizedParamAddLutFlag(builder, lutFlag): builder.PrependBoolSlot(0, lutFlag, 0)
def AddLutFlag(builder, lutFlag):
    return LutSuperAcmeQuantizedParamAddLutFlag(builder, lutFlag)
def LutSuperAcmeQuantizedParamAddLutTbl(builder, lutTbl): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(lutTbl), 0)
def AddLutTbl(builder, lutTbl):
    return LutSuperAcmeQuantizedParamAddLutTbl(builder, lutTbl)
def LutSuperAcmeQuantizedParamStartLutTblVector(builder, numElems): return builder.StartVector(1, numElems, 1)
def StartLutTblVector(builder, numElems):
    return LutSuperAcmeQuantizedParamStartLutTblVector(builder, numElems)
def LutSuperAcmeQuantizedParamAddInputZero(builder, inputZero): builder.PrependInt32Slot(2, inputZero, 0)
def AddInputZero(builder, inputZero):
    return LutSuperAcmeQuantizedParamAddInputZero(builder, inputZero)
def LutSuperAcmeQuantizedParamAddOutputZero(builder, outputZero): builder.PrependInt32Slot(3, outputZero, 0)
def AddOutputZero(builder, outputZero):
    return LutSuperAcmeQuantizedParamAddOutputZero(builder, outputZero)
def LutSuperAcmeQuantizedParamAddInputScale(builder, inputScale): builder.PrependFloat64Slot(4, inputScale, 0.0)
def AddInputScale(builder, inputScale):
    return LutSuperAcmeQuantizedParamAddInputScale(builder, inputScale)
def LutSuperAcmeQuantizedParamAddOutputScale(builder, outputScale): builder.PrependFloat64Slot(5, outputScale, 0.0)
def AddOutputScale(builder, outputScale):
    return LutSuperAcmeQuantizedParamAddOutputScale(builder, outputScale)
def LutSuperAcmeQuantizedParamEnd(builder): return builder.EndObject()
def End(builder):
    return LutSuperAcmeQuantizedParamEnd(builder)