CASCI-lab / CANA

CANAlization: Control & Redundancy in Boolean Networks
https://casci-lab.github.io/CANA/
MIT License
22 stars 15 forks source link

Input redundancy computed incorrectly for k=1 #28

Closed austin-marcus closed 1 year ago

austin-marcus commented 1 year ago

This section causes the input redundancy of a single-variable constant function to be erroneously calculated as 0, when it should be 1.

Example:

from cana.boolean_node import BooleanNode as BN

print(BN(k=1, outputs=[0,0]).input_redundancy())
print(BN(k=1, outputs=[1,1]).input_redundancy())
print(BN(k=1, outputs=[0,1]).input_redundancy())

produces:

0.0
0.0
0.0

and I believe it should be:

1.0
1.0
0.0
austin-marcus commented 1 year ago

I believe Felipe's fork already has a fix for this.

austin-marcus commented 1 year ago

Resolved by #30.