amnh / PCG

𝙋𝙝𝙮𝙡𝙤𝙜𝙚𝙣𝙚𝙩𝙞𝙘 𝘾𝙤𝙢𝙥𝙤𝙣𝙚𝙣𝙩 𝙂𝙧𝙖𝙥𝙝 ⸺ Haskell program and libraries for general phylogenetic graph search
28 stars 1 forks source link

Add unit tests and integration tests for the candidate network edge set of a given graph #105

Closed recursion-ninja closed 5 years ago

recursion-ninja commented 5 years ago

We need a lot more tests for this!

recursion-ninja commented 5 years ago

Property, if we have a valid network N0 and another valid network N1 then the graph:

   r
 /   \
N0    N1

should have a number of candidate network edges equal to the product of the number of candidate network edges in N0 and the number of candidate network edges of N1 minus the number of network edges.

We can start testing this property with binary trees and explore simple network constructions to arbitrarily generate.

recursion-ninja commented 5 years ago

Property, if we have a valid network N0, N1, N2, and N3 then the graph:

      r
   /     \
 N0       a
         / \
       b     c
     /  \  /  \
    N1   d     N3
         |
        N2

There should be no candidate network edges between (a,b), (a,c), and any edges from N1, N2, or N3.

recursion-ninja commented 5 years ago

Property, if we have a valid networks N0, N1, and N2; then the graph:

      r
    /   \
  N0     x
        / \
       N1  N2

should not have any network edges from (r,x), (x,N1), (x, N2). and any edges in N1 or N2.

Boarders commented 5 years ago

This is now (hopefully!) complete as of this commit: https://github.com/amnh/PCG/commit/2ed85b430d2e6bc02f975954840fb04910f36e01

recursion-ninja commented 5 years ago

This looks absolutely great!