-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ring search algorithms #24
base: main
Are you sure you want to change the base?
Conversation
a8d237c
to
7012e87
Compare
There is a bug now returning just empty lists, I will look at it tomorrow. |
Some things I'm unsure with:
|
It's not too messy, and we can still move some of the types and utilities to the
That can't be answerd in general. In case of
Maybe, but that's not very useful here.
Now that you ask, maybe we should have the followings: record PreRing k where
add : Fin k -> PreRing k -> PreRing k
inPreRing : Fin k -> PreRing k -> Bool
record Ring k where
inRing : Fin k -> Ring k -> Bool
Semigroup (Ring k) where
Monoid (Ring k) where
merge : PreRing k -> PreRing k -> Ring k -- use `xor` here as well
|
I moved Visited k and Ring k and their utility functions to Types.idr at the bottom of the file. The exported function search1 now returns a list of rings but getRings and getRings' still return the state. |
Great! Looking good now. There are still a couple of layouting issues (have you read the style guide ;-) ), but it will be easier to quickly discuss those in person. I think, once you implement |
Wait, no, ignore the above about |
I have read it but apparently forgot some of it then :-) |
implementation of Eq for PreRings is missing. I wasn't if and where I should implement this |
I get a type error when using mkGraph on List (LNode () ) and List( LEdge () ) that I don't understand. If you have time maybe you could give me some feedback or we can look at it tomorrow :-) |
Look at the type of |
Look good :-) |
9a195e4
to
27a829b
Compare
27a829b
to
9a195e4
Compare
The algorithm detects ring systems with one common node as fused rings, which is not what we want right? It seems that the if statement to filter ring systems with more than 1 common node does not work the way I intended. I am not sure why. |
I have a problem when typechecking test.ipkg that I dont know how to fix. I guess we can look at it this afternoon @stefan-hoeck? |
…raph into ringSearch
So, the bad news is: There was another bug. A few cycle bases (only 5 or so in CyBy) are too large. The good news: After some serious debugging, I found the issue - and it was again my own "cleverness"; so it is only fitting that I had to figure it out, haha. Now, all cycle bases in all three test sets are of the correct size. Testing relevant cycle counts now. |
No description provided.