graphp / algorithms

Common mathematical graph algorithms implemented in PHP
MIT License
136 stars 68 forks source link

add isAcyclic function in the GraphProperty class #38

Open Gillu13 opened 4 years ago

Gillu13 commented 4 years ago

I added an "isAcyclic" function in the GraphProperty class + some unit tests. Hope this was the right place to add this.

Gillu13 commented 4 years ago

OK, I need to change the array declaration to be complient with php 5.3

clue commented 4 years ago

@Gillu13 Thank you for filing this PR :+1: It looks like this might be better off in a separate class (see also #33) and this should probably be tested against more graphs (i.e. empty, edgeless, loop edges etc.), is this something you're planning to look into?

I'd first like to get a maintenance release out to bring this library up to date before introducing any additional algorithms. Once this is done, I'm looking forward to merging more of these algorithms, so I hope you're still interested in getting this merged then :shipit:

Again thank you for your valuable contribution! I understand this long wait time can be frustrating, so rest assured I'll try to get these intermediary release out as soon as time permits (this project doesn't currently get any sponsoring, so this happens mostly in my spare free time) and will then look into this PR again in more depth! :+1:

Gillu13 commented 4 years ago

Sounds good! cheers