def __init__(self, op, lea1, nTimes=2): Lea.__init__(self) self._op = op self._lea1 = lea1 self._nTimes = nTimes if nTimes <= 0: raise Lea.Error("times method requires a strictly positive integer")
def __init__(self,lea1,nTimes=2): Lea.__init__(self) self._lea1 = lea1 self._lea1Tuple = lea1.map(lambda v: (v,)) self._nTimes = nTimes if nTimes <= 0: raise Lea.Error("cprodTimes method requires a strictly positive integer")
def __init__(self,*iLeas): Lea.__init__(self) self._iLeas = tuple(iLeas) # the following treatment is needed only if some clauses miss variables present # in other clauses (e.g. CPT with context-specific independence) # a rebalancing is needed if there are such missing variables and if these admit multiple # values (total probability weight > 1) aleaLeavesSet = frozenset(aleaLeaf for ilea in iLeas \ for aleaLeaf in ilea.getAleaLeavesSet() \ if aleaLeaf._count > 1 ) self._ctxClea = Clea(*aleaLeavesSet)
def __init__(self,lea1,condLea): Lea.__init__(self) self._lea1 = lea1 self._condLea = condLea
def __init__(self,*args): Lea.__init__(self) self._leaArgs = tuple(Lea.coerce(arg) for arg in args)
def __init__(self, *args): Lea.__init__(self) self._leaArgs = tuple(Lea.coerce(arg) for arg in args) counts = tuple(leaArg.getAlea()._count for leaArg in self._leaArgs) lcm = calcLCM(counts) self._factors = tuple(lcm // count for count in counts)
def __init__(self,f,cleaArgs): Lea.__init__(self) self._f = f self._cleaArgs = cleaArgs
def __init__(self,lea1,nbValues): if nbValues <= 0: raise Lea.Error("draw method requires a strictly positive integer") Lea.__init__(self) self._lea1 = lea1 self._nbValues = nbValues