[Tutor] tree-like functions call to find dependencies

Maxim Loginov zeliboba at mail.ru
Wed Aug 1 17:02:00 CEST 2007

hi all!

my problem is: I have (for example) 2 sets of quantity set(A,B,C) or
set(A,B,D). I need to calculate another quantity E which is function
of A,B,C or A,F. but F in turn is function of (A,B,D). I want to write
one function that checks the supplied set if it possible to calculate
requested the value depending on the set of values supplied, it should
check what input data it needs and call functions in tree-like manner
to check which quantity can they provide. In reality dependecies of
course deeper sets are longer and data are very big arrays (do not fit
into memory of my machine), another reason is easy to extend the
program if I will need a function indirectly depending on already

the question is: maybe there is a design template for this? what I
invented now is bit ugly...

Maxim Loginov

More information about the Tutor mailing list