Git Product home page Git Product logo

Comments (3)

jvdwetering avatar jvdwetering commented on August 25, 2024

That the depth is a float is intentional. The depth simply returns the largest 'row' value in the graph, and this can be fractional, as it works as kind of the 'x' value when drawing.
Rows and columns being switched is now fixed.

from pyzx.

rossduncan avatar rossduncan commented on August 25, 2024

Thanks for fixing this John.

I saw from the code that the depth is just the row number. I am saying that this behaviour is not desirable. (Also rows and columns should probably be integers too!)

from pyzx.

jvdwetering avatar jvdwetering commented on August 25, 2024

The code actually uses the fact that you can have fractional row numbers in a few places to "insert" new nodes in specific positions without having to reposition every other node. Also quantomatic of course allows floating point values for the coordinates. If we forced row and column numbers to be integers than we would have to either (1) round every coordinate when importing or (2) introduce a new coordinate system specifically for qgraph files.
I agree that it is not very intuitive that these values can be floating points, but for now it is quite useful.

from pyzx.

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.