symforce.test_util.random_expressions.op_probabilities module#

class OpProbability(name, func, prob)[source]#

Bases: object

Represents a logical symbolic operation and the probability of it occurring within regular use, for the purpose of generating and profiling random expressions containing these operations.

Probabilities are relative across ops with the same arity, and do not have to sum to one.

Parameters:
name: str#
func: Callable#
prob: float#
property arity: int#