#19332: Add discrete_complementarity_set() method for cones
-------------------------------------+-------------------------------------
Reporter: mjo | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.9
Component: geometry | Resolution:
Keywords: | Merged in:
Authors: Michael Orlitzky | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/mjo/ticket/19332 | 872932952e7db998d013637636ca82124ace544e
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by mjo):
Replying to [comment:5 novoselt]:
> It does work correctly if you take into account `orthogonal_sublattice`
mentioned earlier, I was just too lazy to write the combination, but how
about...
[[BR]]
Ohhh OK. I see what you're doing. I actually use that trick in a few
places in the paper, but I never thought to apply it to the
complementarity set. Thank you!
[[BR]]
[[BR]]
> Note that some rays here will be immutable while others not, so perhaps
the actual implementation should be... with doc fixes that a tuple is
returned.
[[BR]]
Why return a tuple instead of a list? This was the fastest I could make it
(prior to making it a cached method):
{{{
dcs = [ (r,n) for (f,n) in zip(self.facets(), self.facet_normals())
for r in f ]
orthogonal_gens = list(self.orthogonal_sublattice().gens())
orthogonal_gens += [ (-g).set_immutable() for g in orthogonal_gens ]
return dcs + [ (r,g) for r in self for g in orthogonal_gens ]
}}}
[[BR]]
> If your tests for large cones show that it is indeed faster, let's use
this one. I am quite positive that it will be faster on its own, but if
you take constructing the face lattice into account it is not so obvious
anymore.
[[BR]]
It is still much faster.
--
Ticket URL: <http://trac.sagemath.org/ticket/19332#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.