I have 3 classes that generate random numbers by different methods. Each of them has functions with the same name:
Init and Random.
A:Init() and A:Random()
B:Init() and B:Random()
C:Init() and C:Random()

I have another class where a calculation is performed. Depending on a local parameter (rng_type) in this class (which can be 1, 2 or 3) I would like to call:
if 1 call the A functions
if 2 call the B Functions
if 3 call the C Functions

Because the Random function will be called millions of times (!), I do not want to have to check the value of rng_type before each use.

Tried to do it with pointer to functions, but could not because the functions in the ABC classes are not static in the calculation class.

Any suggestions on how to do it would be much appreciated.
Eli