Code Monkey home page Code Monkey logo

cytools's People

Contributors

ariostas avatar mdemi avatar natemacfadden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cytools's Issues

Investigate upgrading of qpsolvers

We're currently using qpsolvers v3.3.1, not v3.4.0. The former doesn't support Mosek, while the latter does. This leads to

  • a little annoying message, but
  • more importantly, a (current) inability to use Mosek with qpsolvers.

Try upgrading qpsolvers to 3.4.0 and see if it breaks anything.

fetch_polytopes odd behavior if h11=0

Upon calling fetch_polytopes(h11=0,lattice="N"), polytopes with h11=149 are instead returned. This behavior shouldn't occur. This bug is visible when accidentally writing code like for h11 in range(N): ...

Triangulation(..., make_star=True) doesn't always work

For h11=491, and heights given at the bottom, make_star doesn't return a star triangulation.

heights = [0, 0, -18497377, 0, -19019157, 22257620, 210894, 421802, 632714, 843632, 1054563, 1265497, 1476433, 1687373, -2955639, 1898317, 2109263, 2320213, 2531165, 2742119, 2953338, 3164562, 3375792, 3587024, -5911275, 3798260, 4009500, 4221134, -7379425, 4432770, 4644448, 4856127, 5067809, 5279493, 5491179, -8854917, 5702867, 5914557, 6126249, 6338769, 6551300, -9509580, 6763846, 6976408, 7188972, 7401622, -11798072, 7614318, 7827018, 8062890, 8298764, 8546217, 8793673, -11538142, 9044865, 9296059, 9547263, -14741224, 9798469, 10049681, 10300903, 10552327, 10803752, 11055338, 11306932, 11558810, 11810692, -16619302, 12062994, 12315298, 12567620, 12819944, 13074188, 13328435, 13588419, 13848405, 14120239, 14392075, 14663925, 14935847, -13595706, 15207781, 15479720, 15751664, -8693971, 16023616, -5586817, 16295580, 16567578, -3792226, 16839990, 17112404, 1619231, 17384828, 2183296, 17657254, 17929681, 7261524, 18202145, 8158824, 18474613, 18747109, 19019609, 14134354, 19292111, 19564615, 19837127, -2744740, -2533836, -2322930, -2112020, -1901106, -1690190, -1479260, -1268048, -1056830, -5700357, -845605, -5489429, -634377, -5278213, -423105, -7748083, -5066983, -211640, -8116739, -4855707, 0, -8485393, -4644412, 211650, -8854045, -4432768, 423304, -9222695, -4221122, 634960, -9591343, -4009444, 846618, -8644017, -9959988, -3797764, 1058277, -8433115, -10328632, -3586082, 1269939, -10322575, -8222212, -10697274, -3374396, 1481603, -8011306, -11065914, -3162708, 1693269, -7800398, -11434552, -2951018, 1904937, -9298703, -7589488, -11803188, -2739327, 2116607, -9087823, -7378576, -12171822, -2527631, 2328279, -8876941, -7167662, -12540454, -2315933, 2539953, -8666057, -6956746, -12909084, -2104233, 2751629, -11587208, -8455171, -6745824, -13277712, -1892531, 2964130, -11376342, -8244283, -6534898, -13646338, -1680827, 3176654, -12200652, -11165474, -8033393, -6323621, -14014962, -1469121, 3389196, -10954604, -7822501, -6112339, -14383584, -1257409, 3601752, -12465218, -10743732, -7611595, -5901047, -14752204, -1045695, 3814322, -10532858, -7400680, -5689747, -15120821, -833978, 4027024, -11327198, -10321982, -7189466, -5478099, -15489437, -622250, 4239732, -11116252, -10111105, -6978250, -5266415, -15858051, -410496, 4468038, -10903608, -9900225, -6767032, -5054721, -16226663, -197986, 4703918, -14489400, -10690962, -9689343, -6555810, -4843013, -16595273, 14548, 4955125, -14237566, -10478315, -9478459, -6344576, -4631304, -16963881, 227098, 5206335, -14078724, -13985730, -10265665, -9267573, -6133338, -4419582, -17332487, 439734, 5457549, -13733891, -10053011, -9056685, -5921708, -4207858, -17121591, 652538, 5708765, -15408858, -13482049, -9840355, -8845795, -5710077, -3996114, -16910653, 873188, 5959983, -9235708, -13230205, -9627697, -8634903, -5482061, -3784368, -16699711, 1116635, 6211203, -12978357, -9415037, -8424009, -5238335, -3572618, -16488764, 1367857, 6462621, -16889007, -12726507, -9202375, -8213114, -4987147, -3360096, -16277070, 1619087, 6714053, -12474653, -8989711, -8002216, -4735949, -3147554, -16065374, 1870319, 6965598, -16367485, -12222797, -8777045, -7791236, -4484747, -2934654, -15852722, 2121559, 7217198, -16115665, -11970939, -8564378, -7580254, -4233417, -2721661, -15640024, 2372917, 7469074, -13866544, -15863843, -11719079, -8351708, -7368968, -3981995, -2470545, -15368078, 2624357, 7720954, -15612017, -11467218, -8139036, -7157680, -3730407, -2219319, -15096130, 2875861, 7973027, -18352015, -15360189, -11215354, -7926362, -6946384, -3478818, -1968083, -14824176, 3127503, 8225321, -6933273, -15108359, -10963488, -7713686, -6734738, -3227226, -1716785, -14552220, 3379352, 8477629, -14856527, -10711620, -7501008, -6521842, -2975350, -1465337, -14280263, 3631220, 8729955, -14604681, -10459750, -7288328, -6308945, -2715370, -1213875, -14008303, 3883104, 8982283, -14352444, -10207508, -7075646, -6057723, -2449460, -962141, -13736341, 4135366, 9242270, -15390309, -14100200, -9955258, -6862962, -5806483, -2177617, -710345, -13464375, 4387650, 9506198, -16307433, -14493009, -13847954, -9703006, -6650277, -5555029, -1905691, -458492, -13192407, 4639968, 9778026, -9450750, -6437589, -5303573, -1633761, -206632, -12919977, 4896126, 10049868, -12302988, -10488564, -9198493, -6224899, -5051783, -1361829, 45437, -12647511, 5163994, 10321750, -11405764, -9591270, -8946233, -6012207, -4799991, -1089894, 297707, -12375013, 5435816, 10593692, -5799513, -4548169, -817956, 549983, -12102499, 5707665, 10865640, -4296332, -545306, 821791, -9682004, 5979621, 11137594, -6504031, -4689526, -4044480, -272654, 1093607, -7261506, 6251595, 11409586, 0, 1365769, -4841006, 6523835, 11681911, 272656, 1638231, -2420504, 6796259, 11954329, 1285998, 1910694, 0, 7068707, 12226751, 2420506, 7341163, 12499193, 4841014, 7613621, 12771647, 7886080, 13044109, 13316587, 13589093, 13861601, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

Unable to compute tip coordinates

advanced_fetch_polytopes() and sample_polytopes() often give no solution for cy.toric_kahler_cone().tip_of_stretched_cone(c=1). This problem remains even after reducing to c=10^(-6) or using the backend=“mosek” optimizer. This might be related to whether or not to use points in facets.

Triangulation.heights() returns None, for regular triangulations

For h11=491, heights given at bottom, one can construct the triangulation. If you ask for t.heights(), you get None. This seems semi-generic across randomly chosen heights.

[0, 0, -18497377, 0, -19019157, 22257620, 210894, 421802, 632714, 843632, 1054563, 1265497, 1476433, 1687373, -2955639, 1898317, 2109263, 2320213, 2531165, 2742119, 2953338, 3164562, 3375792, 3587024, -5911275, 3798260, 4009500, 4221134, -7379425, 4432770, 4644448, 4856127, 5067809, 5279493, 5491179, -8854917, 5702867, 5914557, 6126249, 6338769, 6551300, -9509580, 6763846, 6976408, 7188972, 7401622, -11798072, 7614318, 7827018, 8062890, 8298764, 8546217, 8793673, -11538142, 9044865, 9296059, 9547263, -14741224, 9798469, 10049681, 10300903, 10552327, 10803752, 11055338, 11306932, 11558810, 11810692, -16619302, 12062994, 12315298, 12567620, 12819944, 13074188, 13328435, 13588419, 13848405, 14120239, 14392075, 14663925, 14935847, -13595706, 15207781, 15479720, 15751664, -8693971, 16023616, -5586817, 16295580, 16567578, -3792226, 16839990, 17112404, 1619231, 17384828, 2183296, 17657254, 17929681, 7261524, 18202145, 8158824, 18474613, 18747109, 19019609, 14134354, 19292111, 19564615, 19837127, -2744740, -2533836, -2322930, -2112020, -1901106, -1690190, -1479260, -1268048, -1056830, -5700357, -845605, -5489429, -634377, -5278213, -423105, -7748083, -5066983, -211640, -8116739, -4855707, 0, -8485393, -4644412, 211650, -8854045, -4432768, 423304, -9222695, -4221122, 634960, -9591343, -4009444, 846618, -8644017, -9959988, -3797764, 1058277, -8433115, -10328632, -3586082, 1269939, -10322575, -8222212, -10697274, -3374396, 1481603, -8011306, -11065914, -3162708, 1693269, -7800398, -11434552, -2951018, 1904937, -9298703, -7589488, -11803188, -2739327, 2116607, -9087823, -7378576, -12171822, -2527631, 2328279, -8876941, -7167662, -12540454, -2315933, 2539953, -8666057, -6956746, -12909084, -2104233, 2751629, -11587208, -8455171, -6745824, -13277712, -1892531, 2964130, -11376342, -8244283, -6534898, -13646338, -1680827, 3176654, -12200652, -11165474, -8033393, -6323621, -14014962, -1469121, 3389196, -10954604, -7822501, -6112339, -14383584, -1257409, 3601752, -12465218, -10743732, -7611595, -5901047, -14752204, -1045695, 3814322, -10532858, -7400680, -5689747, -15120821, -833978, 4027024, -11327198, -10321982, -7189466, -5478099, -15489437, -622250, 4239732, -11116252, -10111105, -6978250, -5266415, -15858051, -410496, 4468038, -10903608, -9900225, -6767032, -5054721, -16226663, -197986, 4703918, -14489400, -10690962, -9689343, -6555810, -4843013, -16595273, 14548, 4955125, -14237566, -10478315, -9478459, -6344576, -4631304, -16963881, 227098, 5206335, -14078724, -13985730, -10265665, -9267573, -6133338, -4419582, -17332487, 439734, 5457549, -13733891, -10053011, -9056685, -5921708, -4207858, -17121591, 652538, 5708765, -15408858, -13482049, -9840355, -8845795, -5710077, -3996114, -16910653, 873188, 5959983, -9235708, -13230205, -9627697, -8634903, -5482061, -3784368, -16699711, 1116635, 6211203, -12978357, -9415037, -8424009, -5238335, -3572618, -16488764, 1367857, 6462621, -16889007, -12726507, -9202375, -8213114, -4987147, -3360096, -16277070, 1619087, 6714053, -12474653, -8989711, -8002216, -4735949, -3147554, -16065374, 1870319, 6965598, -16367485, -12222797, -8777045, -7791236, -4484747, -2934654, -15852722, 2121559, 7217198, -16115665, -11970939, -8564378, -7580254, -4233417, -2721661, -15640024, 2372917, 7469074, -13866544, -15863843, -11719079, -8351708, -7368968, -3981995, -2470545, -15368078, 2624357, 7720954, -15612017, -11467218, -8139036, -7157680, -3730407, -2219319, -15096130, 2875861, 7973027, -18352015, -15360189, -11215354, -7926362, -6946384, -3478818, -1968083, -14824176, 3127503, 8225321, -6933273, -15108359, -10963488, -7713686, -6734738, -3227226, -1716785, -14552220, 3379352, 8477629, -14856527, -10711620, -7501008, -6521842, -2975350, -1465337, -14280263, 3631220, 8729955, -14604681, -10459750, -7288328, -6308945, -2715370, -1213875, -14008303, 3883104, 8982283, -14352444, -10207508, -7075646, -6057723, -2449460, -962141, -13736341, 4135366, 9242270, -15390309, -14100200, -9955258, -6862962, -5806483, -2177617, -710345, -13464375, 4387650, 9506198, -16307433, -14493009, -13847954, -9703006, -6650277, -5555029, -1905691, -458492, -13192407, 4639968, 9778026, -9450750, -6437589, -5303573, -1633761, -206632, -12919977, 4896126, 10049868, -12302988, -10488564, -9198493, -6224899, -5051783, -1361829, 45437, -12647511, 5163994, 10321750, -11405764, -9591270, -8946233, -6012207, -4799991, -1089894, 297707, -12375013, 5435816, 10593692, -5799513, -4548169, -817956, 549983, -12102499, 5707665, 10865640, -4296332, -545306, 821791, -9682004, 5979621, 11137594, -6504031, -4689526, -4044480, -272654, 1093607, -7261506, 6251595, 11409586, 0, 1365769, -4841006, 6523835, 11681911, 272656, 1638231, -2420504, 6796259, 11954329, 1285998, 1910694, 0, 7068707, 12226751, 2420506, 7341163, 12499193, 4841014, 7613621, 12771647, 7886080, 13044109, 13316587, 13589093, 13861601, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

"Abnormal" Status in Cone.find_interior_point

Cone.find_interior_point occasionally returns the "Abnormal" status, such as in the following example:
Cone(hyperplanes=[[-400002,-400003],[-1,-1]]).find_interior_point()

The method Cone.find_interior_point() is widely used, so this bug arises in other methods, like
Cone([[-1000000.75,1000000.5], [1,-1]]).is_pointed()

This latter cone is very 'flat' (almost half-space), likely more so than in realistically encountered cones, so this may be a low urgency bug.

Triangulation.neighbor_triangulations() is much slower in current release

Triangulation.neighbor_triangulations() is much slower in recent releases compared to version 1.0.1. For example,

from cytools import *
import timeit

poly_gen = fetch_polytopes(lattice='N', h11=30, favorable=True)
poly = next(poly_gen)
tri = poly.triangulate()
code = """
tri.neighbor_triangulations()
"""
print(timeit.timeit(code, number=10, globals=globals()))

returns ~58 in version 1.0.12 compared to ~1.2 in version 1.0.1.

This is most likely due to #8 (commit 09d5ac2) where we upgraded TOPCOM.

Add face computations to cones

Currently there are no functions to find the faces of a cone. It's certainly a useful thing to have, so we should add it at some point.

Cone.find_interior_point disobeys stretching when _rays are used

There's no guarantee that the point defined by point = np.sum(self._rays, axis=0) (potentially scaled) is actually a distance c from each wall of the cone.

Likely not too important in practice. Especially because, if point is too close to a wall, you can just scale up point until it's far enough away...

Windows installation sometimes doesn't create a desktop shortcut

@jletai reported that the Windows installation script failed to create a desktop shortcut. I think this is because part of the path is hardcoded and it might fail if Windows is in a different language or something like that. We should change the script so that it uses a PowerShell command to find the Desktop path.

SCIP solver misbehaves sometimes

@r-nally found that running Cone([[1, -1, 0] ,[0, 1, -2] ,[0, 0, 1]]).find_grading_vector() fails with status ABNORMAL. Maybe let's just change it so that GLOP is always the default backend.

Upgrade to Python 3.11

CPython 3.11 provides a significant performance boost (they say 10-60%), so we should upgrade once all dependencies also support the new version.

Upgrade TOPCOM version

We currently use 0.17.8, but 1.1.2 is out now and it comes with lots of improvements.

Add option to return transformations to transform into normal form

This will probably involve taking a closer look at the python code that does the normal form computation since sometimes it differs from the output of PALP. It could be that the conventions are different, but PALP is used by default to avoid problems, and as far as I know there's no way to get the transformation from PALP.

Better support for non-favorable polytopes

There is currently experimental support for non-favorable polytopes, but it is pretty limited. It's not too hard to extend more computations, but we have to decide on good conventions.

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.