Git Product home page Git Product logo

Comments (1)

mlesnick avatar mlesnick commented on June 16, 2024

With the current organization of the code (which certainly needs work), it is not easy to see how to implement this fix.
Here are some notes on this, for later use:

-The ComputationInput class (defined in computation.h) stores the exact grades and y_grades.

-ComputationInput is built from an InputData struct (defined in data_reader.h); it largely stores the same information as InputData, and in fact does so redundantly. (There is a TODO in computation.h noting that ComputationInput and InputData should be merged into a single entity.)

-The printing of the presentation is done by computation.minpres_ready.connect(), defined in console.cpp, via a call to the Presentation::print_sparse(). (I think this is run, via some boost signaling magic, when minpres_ready() is called in Computation::compute_raw.)

To print the desired firep format for a presentation, a quick fix could be as follows:
1)modify the Presentation class to store the vectors of exact x- and y-grades, perhaps also introduce a constructor which stores that info upon initialization.
2)rewrite Presentation::print_sparse() to print in the correct format, taking advantage of the exact grade info.
3)Modify Computation::compute_min_pres_and_betti_nums (line 197) to construct the presentation with the exact x- and y-grade info. (Note that since this method takes the ComputationInput object as an argument, one has convenient access to the exact grade info here.)

I'm not sure how elegant this is. And it doesn't address closely related issues/todos, namely that morally, the FIRep and Bifiltration classes should perhaps also store exact grade info (see issue #99), and also that it would be helpful to have an option in RIVET to print fireps (in the correct format). If we want that, then it seems that in addition to modifying the classes in question, we will also have to do some work on the DataReader class, where a lot of the action happens with respect to building the bifiltrations and fireps.

from rivet.

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.