This is used to manipulate proportionnal Tables with uncomplete cells (UP stands for uncomplete and proportionnal).
The main method is into_cross_product_equation() which needs an object being an unknown content of the Table_UP and which will create the CrossProductEquation that allows to calculate the unknown content. (For instance, into_cross_product_equation(Item('AB')) will create something like AB/4 = 5/7).
Possible args for __init__():
nb|numericCalculable, [nb|numericCalculable], [None|(None|literalCalculable, None|literalCalculable)]
The first argument is the coefficient,
the second argument is the first line of the Table
the third argument tells which cells should appear as empty. Each element of this list matches one column. For each element: if it's None or (None, None), then the column is complete; if it's (None, literalCalculable) then the cell of the first line is complete and the cell of the second line is unknown (and the literal Calculable will be displayed there); if it's (literalCalculable, None) then the cell of the first line is unknown (and the literal Calculable will be displayed there) and the second line is known; if it's (literalCalculable, literalCalculable) then both the cells of first and second lines are unknown (and won't be listed as calculable elements in cross_product_info).
For instance, if you want to create this table:
AB | 20 | EF | 15
40 | 80 | GH | KL
then you have to write:
t = Table_UP(Item(4), [Item(10), Item(20), None, Item(15)], [('AB', None), None, ('EF', 'GH'), (None, 'KL')])
The two last arguments must have the same length. One column at least must be complete (otherwise there would be no mean to fill the empty cells).
__init__() will compute the second line from the first and the coefficient.
Fields:
coeff: (read-only) the coefficient of the Table
cross_product_info: (read-only) is a dictionnary where the keys are the unknown contents (like "EF", "AB" etc.) and the data are tuples containing the numbers of columns allowing to calculate the unknown content thanks to a cross product. For instance, {'AB' : (0,1), 'KL' : (3,1)} means that 'KL' can be calculated using the columns number 3 and 1.
Debugging info: no dbg_str() method, so far