Jean-Baptiste-Camps / stemmatology

Stemmatological Analysis of Textual Traditions
GNU General Public License v3.0
15 stars 3 forks source link

PCC.equipollent #7

Open Jean-Baptiste-Camps opened 7 years ago

Jean-Baptiste-Camps commented 7 years ago

This function needs to have some simple tests just to check if the values inputed by the user exist in the database, and to avoid unexpected function stops due to user typo.

Jean-Baptiste-Camps commented 6 years ago

Ok, here is a more serious issue, with implications of complexity.

Right now, what the function does is that it looks at an adjacency matrix, and,

  1. for each VL, makes the list of the VL with which it is not in conflict, and then deduplicates them;
  2. look at each list, to see if there are internal conflicts;
  3. remove lists that have internal conflicts;
  4. use the remaining lists to build alternative databases.

It works ok with simple cases, such as `fournival'

Simple case: fournival

Starting situation

Adjacency matrix

    64 93 169 280 230
64   0  1   1   1   0
93   1  0   1   0   1
169  1  1   0   0   1
280  1  0   0   0   1
230  0  1   1   1   0

conflicts_fourniclean

Output

The lists identified are:

And, the last one is then removed, because it has 'internal' conflicts.

Problematic case, ChevLyon

But, with more complex cases, such as Chevalier au lion, it is quite hard to do so.

Starting situation

Adjacency matrix:

   11 23 56 12 19 22 44 21 51 33 27 30 48 57
11  0  1  1  0  0  0  0  0  0  0  0  0  0  0
23  1  0  0  1  0  0  0  0  0  0  0  0  0  0
56  1  0  0  1  0  0  0  0  0  0  0  0  1  0
12  0  1  1  0  0  0  0  0  0  0  0  0  0  0
19  0  0  0  0  0  1  1  0  0  0  0  0  0  0
22  0  0  0  0  1  0  1  0  0  1  0  0  0  0
44  0  0  0  0  1  1  0  0  0  1  0  0  0  0
21  0  0  0  0  0  0  0  0  1  0  0  0  0  0
51  0  0  0  0  0  0  0  1  0  0  0  0  0  1
33  0  0  0  0  0  1  1  0  0  0  0  0  0  0
27  0  0  0  0  0  0  0  0  0  0  0  1  0  0
30  0  0  0  0  0  0  0  0  0  0  1  0  0  0
48  0  0  1  0  0  0  0  0  0  0  0  0  0  0
57  0  0  0  0  0  0  0  0  1  0  0  0  0  0

chevlyon_conflicts

Output

For now, the output is no list at all, because, for instance, 11 is not in conflict with all other VL except 56 and 23, but all of them have 'internal' conflicts.

The question is: what do we want in such a case? Do we want all combinations? Eg.

Does that even make real sense, apart from being complex ? @floriancafiero , what do you think ?