in src/beanmachine/ppl/compiler/bmg_types.py [0:0]
def _lookup():
global _lookup_table
if _lookup_table is None:
R = Real.__class__
RP = PositiveReal.__class__
RN = NegativeReal.__class__
P = Probability.__class__
S = SimplexMatrix(1, 1).__class__
N = Natural.__class__
B = Boolean.__class__
OH = One.__class__
Z = Zero.__class__
_lookup_table = {
(R, R): RealMatrix,
(R, RP): RealMatrix,
(R, RN): RealMatrix,
(R, P): RealMatrix,
(R, S): RealMatrix,
(R, N): RealMatrix,
(R, B): RealMatrix,
(R, OH): RealMatrix,
(R, Z): RealMatrix,
(RP, R): RealMatrix,
(RP, RP): PositiveRealMatrix,
(RP, RN): RealMatrix,
(RP, P): PositiveRealMatrix,
(RP, S): PositiveRealMatrix,
(RP, N): PositiveRealMatrix,
(RP, B): PositiveRealMatrix,
(RP, OH): PositiveRealMatrix,
(RP, Z): PositiveRealMatrix,
(RN, R): RealMatrix,
(RN, RP): RealMatrix,
(RN, RN): NegativeRealMatrix,
(RN, P): RealMatrix,
(RN, S): RealMatrix,
(RN, N): RealMatrix,
(RN, B): RealMatrix,
(RN, OH): RealMatrix,
(RN, Z): NegativeRealMatrix,
(P, R): RealMatrix,
(P, RP): PositiveRealMatrix,
(P, RN): RealMatrix,
(P, P): ProbabilityMatrix,
(P, S): ProbabilityMatrix,
(P, N): PositiveRealMatrix,
(P, B): ProbabilityMatrix,
(P, OH): ProbabilityMatrix,
(P, Z): ProbabilityMatrix,
(S, R): RealMatrix,
(S, RP): PositiveRealMatrix,
(S, RN): RealMatrix,
(S, P): ProbabilityMatrix,
(S, S): SimplexMatrix,
(S, N): PositiveRealMatrix,
(S, B): ProbabilityMatrix,
(S, OH): SimplexMatrix,
(S, Z): ProbabilityMatrix,
(N, R): RealMatrix,
(N, RP): PositiveRealMatrix,
(N, RN): RealMatrix,
(N, P): PositiveRealMatrix,
(N, S): PositiveRealMatrix,
(N, N): NaturalMatrix,
(N, B): NaturalMatrix,
(N, OH): NaturalMatrix,
(N, Z): NaturalMatrix,
(B, R): RealMatrix,
(B, RP): PositiveRealMatrix,
(B, RN): RealMatrix,
(B, P): ProbabilityMatrix,
(B, S): ProbabilityMatrix,
(B, N): NaturalMatrix,
(B, B): BooleanMatrix,
(B, OH): BooleanMatrix,
(B, Z): BooleanMatrix,
(OH, R): RealMatrix,
(OH, RP): PositiveRealMatrix,
(OH, RN): RealMatrix,
(OH, P): ProbabilityMatrix,
(OH, S): SimplexMatrix,
(OH, N): NaturalMatrix,
(OH, B): BooleanMatrix,
(OH, OH): OneHotMatrix,
(OH, Z): BooleanMatrix,
(Z, R): RealMatrix,
(Z, RP): PositiveRealMatrix,
(Z, RN): NegativeRealMatrix,
(Z, P): ProbabilityMatrix,
(Z, S): ProbabilityMatrix,
(Z, N): NaturalMatrix,
(Z, B): BooleanMatrix,
(Z, OH): BooleanMatrix,
(Z, Z): ZeroMatrix,
}
return _lookup_table