def compile_state_cpfs(self,
                           scope: Dict[str, TensorFluent],
                           batch_size: Optional[int] = None,
                           noise: Optional[Noise] = None) -> List[CPFPair]:
        '''Compiles the next state fluent CPFs given the current `state` and `action` scope.

        Args:
            scope (Dict[str, :obj:`rddl2tf.fluent.TensorFluent`]): The fluent scope for CPF evaluation.
            batch_size (Optional[int]): The batch size.

        Returns:
            A list of state fluent CPFs compiled to :obj:`rddl2tf.fluent.TensorFluent`.
        '''
        next_state_fluents = []

        with self.graph.as_default():
            with tf.name_scope('state_cpfs'):

                for cpf in self.rddl.domain.state_cpfs:
                    cpf_noise = noise.get(cpf.name, None) if noise is not None else None

                    name_scope = utils.identifier(cpf.name)
                    with tf.name_scope(name_scope):
                        t = self._compile_expression(cpf.expr, scope, batch_size, cpf_noise)

                    next_state_fluents.append((cpf.name, t))

                key = lambda f: self.rddl.domain.next_state_fluent_ordering.index(f[0])
                next_state_fluents = sorted(next_state_fluents, key=key)

        return next_state_fluents
def compile_state_cpfs ( self , scope : Dict [ str , TensorFluent ] , batch_size : Optional [ int ] = None , noise : Optional [ Noise ] = None ) -> List [ CPFPair ] : next_state_fluents = [ ] with self . graph . as_default ( ) : with tf . name_scope ( 'state_cpfs' ) : for cpf in self . rddl . domain . state_cpfs : cpf_noise = noise . get ( cpf . name , None ) if noise is not None else None name_scope = utils . identifier ( cpf . name ) with tf . name_scope ( name_scope ) : t = self . _compile_expression ( cpf . expr , scope , batch_size , cpf_noise ) next_state_fluents . append ( ( cpf . name , t ) ) key = lambda f : self . rddl . domain . next_state_fluent_ordering . index ( f [ 0 ] ) next_state_fluents = sorted ( next_state_fluents , key = key ) return next_state_fluents
Compiles the next state fluent CPFs given the current `state` and `action` scope.

        Args:
            scope (Dict[str, :obj:`rddl2tf.fluent.TensorFluent`]): The fluent scope for CPF evaluation.
            batch_size (Optional[int]): The batch size.

        Returns:
            A list of state fluent CPFs compiled to :obj:`rddl2tf.fluent.TensorFluent`.