Comments (10)
As usual it would be best to have @sccolbert opinion on this but I believe that you should try to avoid building over-large systems. Typically enaml use one solver per container to keep the system size reasonable. In your case it sounds like you could break the problem in multiple pieces which is likely to give better results.
I never had time to look at your implementation but I still hope to do so at one point now that I spent sometime in enaml codebase to write the documentation.
from kiwi.
@MatthieuDartiailh Thanks! My implementation probably needs another set of eyes. Its seems pretty robust for most conditions, but maybe there are serious design flaws... I've not used a constraints system before, so probably made a bunch of mistakes.
In this case, I understand what you are suggesting about nesting the solvers, but I'm not sure that's practical. Basically, in the horizontal, everything I'm specifying needs to be part of the constraints. A good number of constraints are redundant given the grid layout (i.e. the left edge of each axes in a column is the same, and if the axes span the same number of columns, their widths are the same) so perhaps there is room for optimization there. But that would make the code a lot more complicated.
from kiwi.
It is by no means perfect but you can have a look at my description pf enaml system in kiwi docs. I agree the code may end up beong more convoluted (enaml is), but it may be the price. My plate is quite full at the moment but I will try to have a look next week or the week after. Don't hesitate to ping me if you do not hear from me.
from kiwi.
from kiwi.
from kiwi.
Thanks @sccolbert Not sure I can really do that since in this iteration the width of some objects depends on the height, and neither are known.
A related question: I have a few "helper" Variables with constraints like axlb.width == axlb.right - axlb.left | 'required'
. These could all be removed, but would that help the solution be more manageable?
from kiwi.
from kiwi.
from kiwi.
@jklymak I belive you fixed your issue now in matplotlib correct ? Would you mind providing a quick conclusion to this issue ?
from kiwi.
Not directly - I did a rewrite that had far fewer constraints. Always goes better the second time around ;-). OTOH I don't think the new system will take into account ratios, so this can certainly be closed.
from kiwi.
Related Issues (20)
- Failed building wheel for kiwisolver :( HOT 4
- Cann't install on python 3.11b3 HOT 2
- 1.4.3 has no attribute __version__ HOT 2
- ERROR: Failed building wheel for kiwisolver: C2440: 'static_cast': cannot convert from 'expr_type' to 'type' HOT 2
- Provide cp311 releases HOT 1
- Objective cell memory leak? HOT 26
- Continuous fuzzing by way of Google's OSS-Fuzz HOT 1
- Tests fail on pypy
- #egg=kiwisolver See assertion error when installing kiwisolver HOT 4
- about duplicate constraints HOT 3
- Add Python API to get all constraints HOT 14
- Is it possible to get the absolute value of an expression? HOT 10
- Is it possible to tell the Solver to prefer smaller or larger solutions? HOT 3
- Missing type hint for `Constraint.violated()` HOT 1
- Python 3.12 manylinux wheels HOT 2
- PyInstaller executable with matplotlib cannot find _cext DLL HOT 6
- `top_level.txt` include a non existing module `src`
- DLL load failed while importing _cext HOT 2
- How do we define an "objective function" and maximize or minimize it? HOT 1
- On Windows 10 LTSC, import kiwisolver (and/or import matplotlib) fails with DLL _cext even after installing VS runtime (solution incl) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kiwi.