Giter Site home page Giter Site logo

Comments (11)

ctralie avatar ctralie commented on May 18, 2024

I like the idea of separating out the C++ code and keeping it as a fork of ripser, but honestly I would need to know more about the "C bindings" by @mtsch before I could be sure how I feel about it. What are the planned features there?
Thanks,
Chris

from ripser.py.

mtsch avatar mtsch commented on May 18, 2024

Hello,

Sorry for taking so long, I was pretty busy and then I went away for a week. I had the chance to take a look at the code and from what I can see, the pythondm function is pretty much what I had in mind.
The only thing I'm not so sure about is storing lengths and indices as floats, but I don't really see a better way to do it.

I just need to add a function that transforms it into a C array and declare it as extern "C".

Cheers, Matija

from ripser.py.

ctralie avatar ctralie commented on May 18, 2024

from ripser.py.

mtsch avatar mtsch commented on May 18, 2024

I added the C thing for both the regular and sparse versions in #21.
About the outputs: do you maybe think it would be a good idea to return 4 arrays, one for the numbers of intervals in each dimension, one for the births and deaths, one for cocycle lengths and one for the cocycles. The C interface would then be something like int cripser(int** numperclass, float** birthsanddeaths, int** cocyclelength, int** cocycles, ...). The function would return the number of dimensions.
I'm not sure what the best way to do this is in C++ or how that works with Python, since I don't have a lot of experience with those.

from ripser.py.

ctralie avatar ctralie commented on May 18, 2024

Okay great! I merged that in, thanks.

One warning, though. I indeed got sparse matrices to work on that branch, but I seem to have broken cocycles. So I'm still working that out, which is why I haven't merged it to master yet. Luckily, this is something internal, and it shouldn't affect any of the code you've written. But careful using it until that's resolved.

Let me reach out to Uli Bauer again to see if he can help me fix the cocycles

from ripser.py.

mtsch avatar mtsch commented on May 18, 2024

No worries about the cocycles, I haven't needed them yet and they were never available in my wrapper. I do plan on supporting them, but I have some major restructuring to do first.

By the way, huge thanks for doing this, it's gonna be really useful for me!

from ripser.py.

ctralie avatar ctralie commented on May 18, 2024

@mtsch @sauln should I close this issue?

Or should we continue the discussion? I think the code is setup now that very small entry point blocks can be added to support other languages. Not sure if you want to keep my fork as just a Python fork or have those other languages in the fork as well?

from ripser.py.

mtsch avatar mtsch commented on May 18, 2024

I think it's better to have the bindings for different languages separated, or it could get messy. Either way, the Julia bindings need to be separate because Julia's package manager downloads code from Github directly and it requires a certain repo structure.
It would be perfect if the C++ code was separated from the bindings (or maybe merged into the main repo if Uli would have it), but I can live with the current solution as well. I would however propose a libripser branch that only includes the C++ part and a Makefile that builds a .so/.dll file. I can prepare a PR this week if you agree. Another nitpick is that we should probably rename the pythondm function to something else because it's not really Python specific.

Beside all that, It's looking great!

from ripser.py.

ctralie avatar ctralie commented on May 18, 2024

from ripser.py.

ctralie avatar ctralie commented on May 18, 2024

Hi @mtsch, I'm going to try to resolve #25 in the next few days. Once I do that, the C++ code should be frozen for a while. That would be a good time to make a pull request.
Thanks,
Chris

from ripser.py.

ctralie avatar ctralie commented on May 18, 2024

@mtsch, I merged in the new cython wrappers to master because I need to make another branch for matlab that uses then. Could you make a pull request with the stuff you need?
Thanks,
Chris

from ripser.py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.